use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.
the class CouchbaseNativeBenchmarkCacheTest method createCouchbaseEntryManager.
private CouchbaseEntryManager createCouchbaseEntryManager() {
CouchbaseEntryManagerFactory couchbaseEntryManagerFactory = new CouchbaseEntryManagerFactory();
couchbaseEntryManagerFactory.create();
Properties connectionProperties = getSampleConnectionProperties();
CouchbaseEntryManager couchbaseEntryManager = couchbaseEntryManagerFactory.createEntryManager(connectionProperties);
System.out.println("Created CouchbaseEntryManager: " + couchbaseEntryManager);
return couchbaseEntryManager;
}
use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.
the class ClientApiPersistenceEntryManagerFactory method createPersistenceEntryManager.
public final PersistenceEntryManager createPersistenceEntryManager(Properties properties, String persistenceType) {
try {
PersistenceEntryManagerFactory persistenceEntryManagerFactory = this.standalonePersistanceFactoryService.getPersistenceEntryManagerFactory(persistenceType);
if (persistenceEntryManagerFactory.getPersistenceType().equalsIgnoreCase("couchbase")) {
((CouchbaseEntryManagerFactory) persistenceEntryManagerFactory).create();
}
Properties connProps = createConnectionProperties(properties, persistenceEntryManagerFactory.getPersistenceType());
PersistenceEntryManager ret = persistenceEntryManagerFactory.createEntryManager(connProps);
if (ret == null)
throw new RuntimeException("Could not create persistence entry manager");
return ret;
} catch (ConfigurationException e) {
throw new RuntimeException(e.getMessage(), e);
}
}
use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.
the class CouchbaseEntryManagerSample method createCouchbaseEntryManager.
public CouchbaseEntryManager createCouchbaseEntryManager() {
CouchbaseEntryManagerFactory couchbaseEntryManagerFactory = new CouchbaseEntryManagerFactory();
couchbaseEntryManagerFactory.create();
Properties connectionProperties = getSampleConnectionProperties();
CouchbaseEntryManager couchbaseEntryManager = couchbaseEntryManagerFactory.createEntryManager(connectionProperties);
LOG.debug("Created CouchbaseEntryManager: " + couchbaseEntryManager);
return couchbaseEntryManager;
}
use of io.jans.orm.couchbase.impl.CouchbaseEntryManagerFactory in project jans by JanssenProject.
the class ManualCouchbaseEntryManagerTest method createCouchbaseEntryManager.
public static CouchbaseEntryManager createCouchbaseEntryManager() throws IOException {
CouchbaseEntryManagerFactory couchbaseEntryManagerFactory = new CouchbaseEntryManagerFactory();
couchbaseEntryManagerFactory.create();
CouchbaseEntryManager couchbaseEntryManager = couchbaseEntryManagerFactory.createEntryManager(loadProperties());
System.out.println("Created CouchbaseEntryManager: " + couchbaseEntryManager);
return couchbaseEntryManager;
}
Aggregations