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 toHibernateTemplateand SessionFactoryUtils#getSession() were causing "Session is closed" during CacheSynchronization. See resources/ome/services/hibernate.xml- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.context.JTASessionContext
org.hibernate.context.JTASessionContext.CleanupSynch
-
-
Field Summary
-
Fields inherited from class org.hibernate.context.JTASessionContext
factory
-
-
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.SessionbuildOrObtainSession()protected booleanisAutoCloseEnabled()-
Methods inherited from class org.hibernate.context.JTASessionContext
currentSession, getConnectionReleaseMode, isAutoFlushEnabled
-
-
-
-
Constructor Detail
-
CurrentSessionContext
public CurrentSessionContext(org.hibernate.engine.SessionFactoryImplementor sf)
-
-
Method Detail
-
buildOrObtainSession
protected org.hibernate.classic.Session buildOrObtainSession()
- Overrides:
buildOrObtainSessionin classorg.hibernate.context.JTASessionContext
-
isAutoCloseEnabled
protected boolean isAutoCloseEnabled()
- Overrides:
isAutoCloseEnabledin classorg.hibernate.context.JTASessionContext
-
-