use of com.manydesigns.portofino.database.platforms.H2DatabasePlatform in project Portofino by ManyDesigns.
the class PersistenceTest method setup.
protected void setup(FileObject appDir) throws Exception {
Configuration configuration = new PropertiesConfiguration();
final DatabasePlatformsRegistry databasePlatformsRegistry = new DatabasePlatformsRegistry(configuration);
databasePlatformsRegistry.addDatabasePlatform(new H2DatabasePlatform());
databaseModule = new DatabaseModule() {
@Override
public void destroy() {
if (subscription != null) {
subscription.dispose();
subscription = null;
}
}
};
databaseModule.applicationDirectory = appDir;
databaseModule.configuration = new ConfigurationSource(configuration, null);
persistence = databaseModule.getPersistence(databasePlatformsRegistry, new CacheResetListenerRegistry());
databaseModule.init();
persistence.start();
setupJPetStore();
setupHibernateTest();
persistence.initModel();
}
use of com.manydesigns.portofino.database.platforms.H2DatabasePlatform in project Portofino by ManyDesigns.
the class CrudActionTest method setup.
protected void setup(FileObject appDir) throws Exception {
Configuration configuration = new PropertiesConfiguration();
DatabasePlatformsRegistry databasePlatformsRegistry = new DatabasePlatformsRegistry(configuration);
databasePlatformsRegistry.addDatabasePlatform(new H2DatabasePlatform());
persistence = new Persistence(appDir, new ConfigurationSource(configuration, null), databasePlatformsRegistry);
persistence.start();
setupJPetStore();
persistence.initModel();
}
use of com.manydesigns.portofino.database.platforms.H2DatabasePlatform in project Portofino by ManyDesigns.
the class H2Module method init.
@PostConstruct
public void init() {
databasePlatformsRegistry.addDatabasePlatform(new H2DatabasePlatform());
status = ModuleStatus.STARTED;
}
Aggregations