Class Overview
Holder wrapping a JPA EntityManager.
JpaTransactionManager binds instances of this class to the thread,
for a given EntityManagerFactory.
Note: This is an SPI class, not intended to be used by applications.
Summary
Public Methods |
void
|
clear()
Clear the transactional state of this resource holder.
|
EntityManager
|
getEntityManager()
|
[Expand]
Inherited Methods |
From class
org.springframework.transaction.support.ResourceHolderSupport
void
|
clear()
Clear the transactional state of this resource holder.
|
Date
|
getDeadline()
Return the expiration deadline of this object.
|
long
|
getTimeToLiveInMillis()
Return the time to live for this object in milliseconds.
|
int
|
getTimeToLiveInSeconds()
Return the time to live for this object in seconds.
|
boolean
|
hasTimeout()
Return whether this object has an associated timeout.
|
boolean
|
isOpen()
Return whether there are still open references to this holder.
|
boolean
|
isRollbackOnly()
Return whether the resource transaction is marked as rollback-only.
|
boolean
|
isSynchronizedWithTransaction()
Return whether the resource is synchronized with a transaction.
|
boolean
|
isVoid()
Determine whether this holder is considere as 'void',
i.e.
|
void
|
released()
Decrease the reference count by one because the holder has been released
(i.e.
|
void
|
requested()
Increase the reference count by one because the holder has been requested
(i.e.
|
void
|
reset()
Reset this resource holder - transactional state as well as reference count.
|
void
|
setRollbackOnly()
Mark the resource transaction as rollback-only.
|
void
|
setSynchronizedWithTransaction(boolean synchronizedWithTransaction)
Mark the resource as synchronized with a transaction.
|
void
|
setTimeoutInMillis(long millis)
Set the timeout for this object in milliseconds.
|
void
|
setTimeoutInSeconds(int seconds)
Set the timeout for this object in seconds.
|
void
|
unbound()
Notify this holder that it has been unbound from transaction synchronization.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.transaction.support.ResourceHolder
abstract
boolean
|
isVoid()
Determine whether this holder is considere as 'void',
i.e.
|
abstract
void
|
reset()
Reset the transactional state of this holder.
|
abstract
void
|
unbound()
Notify this holder that it has been unbound from transaction synchronization.
|
|
Public Constructors
public
EntityManagerHolder
(EntityManager entityManager)
Public Methods
public
void
clear
()
Clear the transactional state of this resource holder.
public
EntityManager
getEntityManager
()
Protected Methods
protected
boolean
isTransactionActive
()
protected
void
setTransactionActive
(boolean transactionActive)