Top Description Constructors Methods
org.springframework.orm.hibernate5

public Class SpringJtaSessionContext

extends JTASessionContext
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
org.hibernate.FlushMode, .Session, org.hibernate.context.internal.JTASessionContext, org.hibernate.engine.spi.SessionFactoryImplementor, org.springframework.transaction.support.TransactionSynchronizationManager

Spring-specific subclass of Hibernate's JTASessionContext, setting FlushMode.MANUAL for read-only transactions.
Author
Juergen Hoeller
Since
4.2

Constructor Summary

AccessConstructor and Description
public
SpringJtaSessionContext(SessionFactoryImplementor factory)
References Deprecated SessionFactoryImplementor is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
protected Session
buildOrObtainSession()

Overrides org.hibernate.context.internal.JTASessionContext.buildOrObtainSession.

References Deprecated Session is deprecated or references (maybe indirectly) at least one deprecated element.

Strictly provided for subclassing purposes; specifically to allow long-session support.

Inherited from org.hibernate.context.internal.JTASessionContext:
currentSessiongetConnectionReleaseModeisAutoCloseEnabledisAutoFlushEnabled

Constructor Detail

SpringJtaSessionContextback to summary
public SpringJtaSessionContext(SessionFactoryImplementor factory)

References Deprecated

SessionFactoryImplementor is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

buildOrObtainSessionback to summary
protected Session buildOrObtainSession()

Overrides org.hibernate.context.internal.JTASessionContext.buildOrObtainSession.

Doc from org.hibernate.context.internal.JTASessionContext.buildOrObtainSession.

References Deprecated

Session is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Strictly provided for subclassing purposes; specifically to allow long-session support. This implementation always just opens a new session.

Returns:Session

the built or (re)obtained session.

Annotations
@Override