if you want to start databases using Hibernate, for example. using the following code snippet in the main application (twice):
private final HibernateBundle<Cfg> hib1 = new HibernateBundle<Cfg>(ImmutableList.of(SomeHibernateModel.class), new SessionFactoryFactory()) {
@Override
public DataSourceFactory getDataSourceFactory(Cfg configuration) {
return configuration.getDatabaseFactory();
}
};
: 'name(). ( ".postgresql.active" ). :
private final HibernateBundle<Cfg> hib1 = new HibernateBundle<Cfg>(ImmutableList.of(SomeHibernateModel.class), new SessionFactoryFactory()) {
@Override
public DataSourceFactory getDataSourceFactory(Cfg configuration) {
return configuration.getDatabaseFactory();
}
@Override
protected String name() {
return "hibernate.accesslog";
}
};