Class 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:
    Serialized Form
    • Constructor Detail

      • ConfluenceSessionContext

        public ConfluenceSessionContext​(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory)
    • Method Detail

      • currentSession

        public org.hibernate.Session currentSession()
                                             throws org.hibernate.HibernateException
        Specified by:
        currentSession in interface org.hibernate.context.spi.CurrentSessionContext
        Throws:
        org.hibernate.HibernateException