InfoglueDefaultHibernateConfigurationProvider configurationProvider = new InfoglueDefaultHibernateConfigurationProvider();
configurationProvider.setSessionFactory(sessionFactory);
args.put("configurationProvider", configurationProvider);
ps = new CachingPropertySet();
Map args2 = new HashMap();
args2.put("PropertySet", PropertySetManager.getInstance("hibernate", args));
args2.put("bulkload", new Boolean(true));
ps.init(new HashMap(), args2);
CacheController.cacheObject("propertySetCache", key, ps);
//logger.info("Caching propertySet for entry: " + entryId + ":" + ps);
ps = PropertySetManager.getInstance("hibernate", args);
}
catch(Exception e)
{
e.printStackTrace();
try
{
logger.error("\n\nRestoring the session factory....");
//sessionFactory.close();
sessionFactory = new Configuration().configure().buildSessionFactory();
InfoglueDefaultHibernateConfigurationProvider configurationProvider = new InfoglueDefaultHibernateConfigurationProvider();
configurationProvider.setSessionFactory(sessionFactory);
Map args = new HashMap();
args.put("configurationProvider", configurationProvider);
ps = new CachingPropertySet();
Map args2 = new HashMap();
args2.put("PropertySet", PropertySetManager.getInstance("hibernate", args));
args2.put("bulkload", new Boolean(true));