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.
| Modifier and Type | Field and Description |
|---|---|
| private CurrentSessionContext | |
| private final SessionFactoryImplementor | sessionFactory
References Deprecated
SessionFactoryImplementor is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private TransactionManager |
| Access | Constructor and Description |
|---|---|
| public | SpringSessionContext(SessionFactoryImplementor
the SessionFactory to provide current Sessions for sessionFactory)
References Deprecated
SessionFactoryImplementor is deprecated or references (maybe indirectly) at least one deprecated element.
Create a new SpringSessionContext for the given Hibernate SessionFactory. |
| Modifier and Type | Method and Description |
|---|---|
| public Session | currentSession()
Implements org.
References Deprecated
Session is deprecated or references (maybe indirectly) at least one deprecated element.
Retrieve the Spring-managed Session for the current thread, if any. |
| jtaSessionContext | back to summary |
|---|---|
| private CurrentSessionContext jtaSessionContext
| |
| sessionFactory | back to summary |
|---|---|
| private final SessionFactoryImplementor sessionFactory
References Deprecated
See corresponding docs for further information. | |
| transactionManager | back to summary |
|---|---|
| private TransactionManager transactionManager
| |
| SpringSessionContext | back to summary |
|---|---|
| public SpringSessionContext(SessionFactoryImplementor sessionFactory)
References Deprecated
See corresponding docs for further information. Create a new SpringSessionContext for the given Hibernate SessionFactory.
| |
| currentSession | back to summary |
|---|---|
| public Session currentSession() throws HibernateException Implements org. References Deprecated
See corresponding docs for further information. Retrieve the Spring-managed Session for the current thread, if any.
| |