Class StatelessSessionImpl

java.lang.Object
org.hibernate.internal.AbstractSharedSessionContract
org.hibernate.internal.StatelessSessionImpl
All Implemented Interfaces:
Serializable, AutoCloseable, LobCreationContext, SharedSessionContractImplementor, QueryProducer, QueryProducerImplementor, JdbcSessionOwner, TransactionCoordinatorBuilder.Options, SharedSessionContract, StatelessSession, JavaType.CoercionContext, WrapperOptions

public class StatelessSessionImpl extends AbstractSharedSessionContract implements StatelessSession
Concrete implementation of the StatelessSession API.

Exposes two interfaces:

This class is not thread-safe.

See Also:
Implementation Note:
The StatelessSessionImpl is not an EventSource and does not make use of the usual eventing infrastructure to implement persistence operations. It does raise pre- and post- events for the benefit of integration, however. Since it performs all operations synchronously, it does not maintain an ActionQueue. Therefore, it cannot, unfortunately, reuse the various EntityAction subtypes. This is a pity, since it results in some code duplication. On the other hand, a StatelessSession is easier to debug and understand. A StatelessSession does hold state in a long-lived PersistenceContext, but it does temporarily keep state within an instance of StatefulPersistenceContext while processing the results of a given query.