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 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

      `JTASessionContext.CleanupSync`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpringJtaSessionContext(SessionFactoryImplementor factory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### SpringJtaSessionContext

          public SpringJtaSessionContext(SessionFactoryImplementor factory)

  - ### Method Detail

    - #### buildOrObtainSession

          protected Session buildOrObtainSession()

      Overrides:
        `buildOrObtainSession` in class `JTASessionContext`