Class SpringSessionContext
java.lang.Object
org.springframework.orm.hibernate5.SpringSessionContext
- All Implemented Interfaces:
- Serializable,- CurrentSessionContext
Implementation of Hibernate 3.1's 
CurrentSessionContext interface
 that delegates to Spring's SessionFactoryUtils for providing a
 Spring-managed 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.2
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionSpringSessionContext(SessionFactoryImplementor sessionFactory) Create a new SpringSessionContext for the given Hibernate SessionFactory.
- 
Method SummaryModifier and TypeMethodDescriptionRetrieve the Spring-managed Session for the current thread, if any.
- 
Constructor Details- 
SpringSessionContextCreate a new SpringSessionContext for the given Hibernate SessionFactory.- Parameters:
- sessionFactory- the SessionFactory to provide current Sessions for
 
 
- 
- 
Method Details- 
currentSessionRetrieve the Spring-managed Session for the current thread, if any.- Specified by:
- currentSessionin interface- CurrentSessionContext
- Throws:
- HibernateException
 
 
-