Class SessionImpl

All Implemented Interfaces:
EntityManager, Serializable, AutoCloseable, LobCreationContext, SessionImplementor, SharedSessionContractImplementor, EventSource, LoadAccessContext, QueryProducer, QueryProducerImplementor, JdbcSessionOwner, TransactionCoordinatorBuilder.Options, Session, SharedSessionContract, JavaType.CoercionContext, WrapperOptions

Concrete implementation of the Session API.

Exposes two interfaces:

This class is not thread-safe.

See Also:
Implementation Note:
The SessionImpl does not directly perform operations against the database or second-level cache. Instead, it is an EventSource, raising events which are processed by various implementations of the listener interfaces defined by org.hibernate.event.spi. These listeners typically place EntityAction instances on the ActionQueue associated with the session, and such actions are executed asynchronously when the session is flushed. The motivation behind this architecture is two-fold: first, it enables customization by sophisticated extensions to Hibernate ORM, and, second, it enables the transactional write-behind semantics of a stateful session. The stateful session holds its state in an instance of StatefulPersistenceContext, which we may view as the first-level cache associated with the session.