Package com.atlassian.hibernate
Class ConfluenceSessionContext
java.lang.Object
com.atlassian.hibernate.ConfluenceSessionContext
- All Implemented Interfaces:
Serializable
,org.hibernate.context.spi.CurrentSessionContext
public class ConfluenceSessionContext
extends Object
implements org.hibernate.context.spi.CurrentSessionContext
A simplified variant of
SpringSessionContext
which re-resolves the supplied
SessionFactory
against the SessionFactoryRegistry
to work around the programmatic wrapping of the
SessionFactory that would otherwise break TransactionSynchronizationManager
.- See Also:
-
Constructor Summary
ConstructorDescriptionConfluenceSessionContext
(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) -
Method Summary
-
Constructor Details
-
ConfluenceSessionContext
public ConfluenceSessionContext(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
-
-
Method Details
-
currentSession
public org.hibernate.Session currentSession() throws org.hibernate.HibernateException- Specified by:
currentSession
in interfaceorg.hibernate.context.spi.CurrentSessionContext
- Throws:
org.hibernate.HibernateException
-