Class MicronautSessionContext
java.lang.Object
io.micronaut.transaction.hibernate.MicronautSessionContext
- All Implemented Interfaces:
- Serializable,- org.hibernate.context.spi.CurrentSessionContext
public class MicronautSessionContext
extends Object
implements org.hibernate.context.spi.CurrentSessionContext
Implementation of Hibernate 3.1's 
CurrentSessionContext interface
 that delegates to ConnectionOperations for providing a current Session.
 This CurrentSessionContext implementation can also be specified in custom SessionFactory setup through the "hibernate.current_session_context_class" property, with the fully qualified name of this class as value.
- Since:
- 4.0.0
- Author:
- graemerocher, Denis Stepanov
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionMicronautSessionContext(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) Create a new MicronautSessionContext for the givenSessionFactoryImplementor.
- 
Method Summary
- 
Constructor Details- 
MicronautSessionContextpublic MicronautSessionContext(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory) Create a new MicronautSessionContext for the givenSessionFactoryImplementor.- Parameters:
- sessionFactory- the SessionFactoryImplementor
 
 
- 
- 
Method Details- 
currentSessionpublic org.hibernate.Session currentSession() throws org.hibernate.HibernateException- Specified by:
- currentSessionin interface- org.hibernate.context.spi.CurrentSessionContext
- Throws:
- org.hibernate.HibernateException
 
 
-