private static class EntityManagerFactoryUtils.TransactionScopedEntityManagerSynchronization extends ResourceHolderSynchronization<EntityManagerHolder,EntityManagerFactory> implements Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
STATUS_COMMITTED, STATUS_ROLLED_BACK, STATUS_UNKNOWN
Constructor and Description |
---|
TransactionScopedEntityManagerSynchronization(EntityManagerHolder emHolder,
EntityManagerFactory emf) |
Modifier and Type | Method and Description |
---|---|
int |
getOrder()
Get the order value of this object.
|
protected void |
releaseResource(EntityManagerHolder resourceHolder,
EntityManagerFactory resourceKey)
Release the given resource (after it has been unbound from the thread).
|
afterCommit, afterCompletion, beforeCommit, beforeCompletion, cleanupResource, flush, flushResource, processResourceAfterCommit, resume, shouldReleaseAfterCompletion, shouldReleaseBeforeCompletion, shouldUnbindAtCompletion, suspend
public TransactionScopedEntityManagerSynchronization(EntityManagerHolder emHolder, EntityManagerFactory emf)
public int getOrder()
Ordered
Higher values are interpreted as lower priority. As a consequence,
the object with the lowest value has the highest priority (somewhat
analogous to Servlet load-on-startup
values).
Same order values will result in arbitrary sort positions for the affected objects.
getOrder
in interface Ordered
Ordered.HIGHEST_PRECEDENCE
,
Ordered.LOWEST_PRECEDENCE
protected void releaseResource(EntityManagerHolder resourceHolder, EntityManagerFactory resourceKey)
ResourceHolderSynchronization
releaseResource
in class ResourceHolderSynchronization<EntityManagerHolder,EntityManagerFactory>
resourceHolder
- the resource holder to processresourceKey
- the key that the ResourceHolder was bound for