Private Session sessionObj = null; private Session getHibSession() throws ORMException { SessionFactory sessionFactObj = null; try { if (sessionObj != null) { return sessionObj; } else { sessionFactObj = HibernateSessionFactory.getInstance().getSessionFactory(hibernateConfig); sessionObj = sessionFactObj.openSession(); return sessionObj; } } catch (HibernateException hibex) { throw new Exception(hibex); } catch (RuntimeException rte) { throw new Exception(rte); } }
My Quotes
When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY
Powered by Find-IP.net
Thursday, June 5, 2014
Hibernate getCurrentSession() versus openSession()
Subscribe to:
Post Comments
(
Atom
)
No comments :