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()
Return the order value of this object, with a
higher value meaning greater in terms of sorting.
|
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
Normally starting with 0, with Integer.MAX_VALUE
indicating the greatest value. Same order values will result
in arbitrary positions for the affected objects.
Higher values can be interpreted as lower priority. As a consequence, the object with the lowest value has highest priority (somewhat analogous to Servlet "load-on-startup" values).
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