Since Hibernate sessions are not thread safe, I cannot get a hibernate currnet session through sessionFactory.getCurrentSession ();
If I choose sessionFactory.openSession (); it works fine for the thread itself, but for nested classes [called from the thread] it will not allow me to access the same newly opened session [Throws "No Session found for current thread" exception].
I am using Spring 3.1.1 and Hibernate 4.1.3
Is there a way to get the current session in a thread?
Or is there a way to access a newly opened session on nested classes called from a thread?
source share