Package org.springframework.orm.jpa
Class EntityManagerHolder
java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.orm.jpa.EntityManagerHolder
- All Implemented Interfaces:
ResourceHolder
- Direct Known Subclasses:
SessionHolder
Resource holder wrapping a JPA
EntityManager
.
JpaTransactionManager
binds instances of this class to the thread,
for a given EntityManagerFactory
.
Also serves as a base class for SessionHolder
,
as of 5.1.
Note: This is an SPI class, not intended to be used by applications.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the transactional state of this resource holder.protected SavepointManager
protected boolean
protected void
setSavepointManager
(SavepointManager savepointManager) protected void
setTransactionActive
(boolean transactionActive) Methods 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
-
EntityManagerHolder
-
-
Method Details
-
getEntityManager
-
setTransactionActive
protected void setTransactionActive(boolean transactionActive) -
isTransactionActive
protected boolean isTransactionActive() -
setSavepointManager
-
getSavepointManager
-
clear
public void clear()Description copied from class:ResourceHolderSupport
Clear the transactional state of this resource holder.- Overrides:
clear
in classResourceHolderSupport
-