Class SessionHolder
java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.orm.jpa.EntityManagerHolder
org.springframework.orm.jpa.hibernate.SessionHolder
- All Implemented Interfaces:
org.springframework.transaction.support.ResourceHolder
Resource holder wrapping a Hibernate
Session (plus an optional Transaction).
HibernateTransactionManager binds instances of this class to the thread,
for a given SessionFactory. Extends EntityManagerHolder,
automatically exposing an EntityManager handle.
Note: This is an SPI class, not intended to be used by applications.
- Since:
- 7.0
- Author:
- Juergen Hoeller
- See Also:
-
Field Summary
Fields inherited from class EntityManagerHolder
entityManager -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class EntityManagerHolder
getEntityManager, getSavepointManager, isTransactionActive, setSavepointManager, setTransactionActiveMethods inherited from class org.springframework.transaction.support.ResourceHolderSupport
getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, resetRollbackOnly, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
-
Constructor Details
-
SessionHolder
-
-
Method Details
-
getSession
-
clear
public void clear()- Overrides:
clearin classEntityManagerHolder
-
closeAll
protected void closeAll()- Overrides:
closeAllin classEntityManagerHolder
-