logger.debug( "Initializing PluginHibernate" );
// Start our own hibernate session, copying everything from the original
configuration = new Configuration();
ICdfEnvironment cdfEnvironment = CdfEngine.getEnvironment();
final String hibernateAvailable =
cdfEnvironment.getResourceLoader().getPluginSetting( PluginHibernateUtil.class,
CdfConstants.PLUGIN_SETTINGS_HIBERNATE_AVAILABLE );
if ( "true".equalsIgnoreCase( hibernateAvailable ) ) {
configuration.setProperties( cdfEnvironment.getHibernateConfigurations().getConfiguration().getProperties() );
sessionFactory = configuration.buildSessionFactory();
}
initialized = true;
return true;
}