Class ConfluenceSessionContext
java.lang.Object
com.atlassian.confluence.impl.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
ConstructorsConstructorDescriptionConfluenceSessionContext(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:
currentSessionin interfaceorg.hibernate.context.spi.CurrentSessionContext- Throws:
org.hibernate.HibernateException
-