Package org.springframework.orm.hibernate5

# Class SpringJtaSessionContext

java.lang.Object
org.hibernate.context.spi.AbstractCurrentSessionContext
org.hibernate.context.internal.JTASessionContext
org.springframework.orm.hibernate5.SpringJtaSessionContext

All Implemented Interfaces:
  `Serializable`, `CurrentSessionContext`

public class SpringJtaSessionContext extends org.hibernate.context.internal.JTASessionContext
Spring-specific subclass of Hibernate's JTASessionContext, setting `FlushMode.MANUAL` for read-only transactions.

Since:
  4.2
Author:
  Juergen Hoeller
See Also:
  - Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class org.hibernate.context.internal.JTASessionContext

`org.hibernate.context.internal.JTASessionContext.CleanupSync`

## Constructor Summary

Constructors
Constructor
Description
`SpringJtaSessionContext(SessionFactoryImplementor factory)`

## Method Summary

Modifier and Type
Method
Description
`protected Session`
`buildOrObtainSession()`

### Methods inherited from class org.hibernate.context.internal.JTASessionContext

`currentSession, getConnectionReleaseMode, isAutoCloseEnabled, isAutoFlushEnabled`

### Methods inherited from class org.hibernate.context.spi.AbstractCurrentSessionContext

`baseSessionBuilder, factory, validateExistingSession`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SpringJtaSessionContext

public SpringJtaSessionContext(SessionFactoryImplementor factory)

## Method Details

### buildOrObtainSession

protected Session buildOrObtainSession()

Overrides:
  `buildOrObtainSession` in class `org.hibernate.context.internal.JTASessionContext`