public class SpringSessionContext
extends java.lang.Object
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.
Modifier and Type | Field and Description |
---|---|
private CurrentSessionContext |
jtaSessionContext |
private SessionFactoryImplementor |
sessionFactory |
private TransactionManager |
transactionManager |
Constructor and Description |
---|
SpringSessionContext(SessionFactoryImplementor sessionFactory)
Create a new SpringSessionContext for the given Hibernate SessionFactory.
|
Modifier and Type | Method and Description |
---|---|
Session |
currentSession()
Retrieve the Spring-managed Session for the current thread, if any.
|
private final SessionFactoryImplementor sessionFactory
private TransactionManager transactionManager
private CurrentSessionContext jtaSessionContext