Package ome.tools.hibernate
Class CurrentSessionContext
- java.lang.Object
-
- org.hibernate.context.JTASessionContext
-
- ome.tools.hibernate.CurrentSessionContext
-
- All Implemented Interfaces:
java.io.Serializable
,org.hibernate.context.CurrentSessionContext
public class CurrentSessionContext extends org.hibernate.context.JTASessionContext
Implementation of Hibernate's current_session_context_class extension point. During the move to strict JTA compliance, nested calls toHibernateTemplate
and SessionFactoryUtils#getSession() were causing "Session is closed" during CacheSynchronization. See resources/ome/services/hibernate.xml- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CurrentSessionContext(org.hibernate.engine.SessionFactoryImplementor sf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.hibernate.classic.Session
buildOrObtainSession()
protected boolean
isAutoCloseEnabled()
-
-
-
Method Detail
-
buildOrObtainSession
protected org.hibernate.classic.Session buildOrObtainSession()
- Overrides:
buildOrObtainSession
in classorg.hibernate.context.JTASessionContext
-
isAutoCloseEnabled
protected boolean isAutoCloseEnabled()
- Overrides:
isAutoCloseEnabled
in classorg.hibernate.context.JTASessionContext
-
-