ome.tools.hibernate
Class CurrentSessionContext

java.lang.Object
  extended by org.hibernate.context.JTASessionContext
      extended by ome.tools.hibernate.CurrentSessionContext
All Implemented Interfaces:
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 to HibernateTemplate and 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
CurrentSessionContext(org.hibernate.engine.SessionFactoryImplementor sf)
           
 
Method Summary
protected  org.hibernate.classic.Session buildOrObtainSession()
           
protected  boolean isAutoCloseEnabled()
           
 
Methods inherited from class org.hibernate.context.JTASessionContext
currentSession, getConnectionReleaseMode, isAutoFlushEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentSessionContext

public CurrentSessionContext(org.hibernate.engine.SessionFactoryImplementor sf)
Method Detail

buildOrObtainSession

protected org.hibernate.classic.Session buildOrObtainSession()
Overrides:
buildOrObtainSession in class org.hibernate.context.JTASessionContext

isAutoCloseEnabled

protected boolean isAutoCloseEnabled()
Overrides:
isAutoCloseEnabled in class org.hibernate.context.JTASessionContext


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.