|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.transaction.support.ResourceHolderSynchronization<PersistenceManagerHolder,PersistenceManagerFactory> org.springframework.orm.jdo.PersistenceManagerFactoryUtils.PersistenceManagerSynchronization
private static class PersistenceManagerFactoryUtils.PersistenceManagerSynchronization
Callback for resource cleanup at the end of a non-JDO transaction (e.g. when participating in a JtaTransactionManager transaction).
JtaTransactionManager
Field Summary | |
---|---|
private boolean |
newPersistenceManager
|
Fields inherited from interface org.springframework.core.Ordered |
---|
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Fields inherited from interface org.springframework.transaction.support.TransactionSynchronization |
---|
STATUS_COMMITTED, STATUS_ROLLED_BACK, STATUS_UNKNOWN |
Constructor Summary | |
---|---|
PersistenceManagerFactoryUtils.PersistenceManagerSynchronization(PersistenceManagerHolder pmHolder,
PersistenceManagerFactory pmf,
boolean newPersistenceManager)
|
Method Summary | |
---|---|
void |
flushResource(PersistenceManagerHolder resourceHolder)
Flush callback for the given resource holder. |
int |
getOrder()
Return the order value of this object, with a higher value meaning greater in terms of sorting. |
protected void |
releaseResource(PersistenceManagerHolder resourceHolder,
PersistenceManagerFactory resourceKey)
Release the given resource (after it has been unbound from the thread). |
protected boolean |
shouldUnbindAtCompletion()
Return whether this holder should be unbound at completion (or should rather be left bound to the thread after the transaction). |
Methods inherited from class org.springframework.transaction.support.ResourceHolderSynchronization |
---|
afterCommit, afterCompletion, beforeCommit, beforeCompletion, cleanupResource, flush, processResourceAfterCommit, resume, shouldReleaseBeforeCompletion, suspend |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final boolean newPersistenceManager
Constructor Detail |
---|
public PersistenceManagerFactoryUtils.PersistenceManagerSynchronization(PersistenceManagerHolder pmHolder, PersistenceManagerFactory pmf, boolean newPersistenceManager)
Method Detail |
---|
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).
getOrder
in interface Ordered
public void flushResource(PersistenceManagerHolder resourceHolder)
ResourceHolderSynchronization
flushResource
in class ResourceHolderSynchronization<PersistenceManagerHolder,PersistenceManagerFactory>
resourceHolder
- the resource holder to flushprotected boolean shouldUnbindAtCompletion()
ResourceHolderSynchronization
The default implementation returns true
.
shouldUnbindAtCompletion
in class ResourceHolderSynchronization<PersistenceManagerHolder,PersistenceManagerFactory>
protected void releaseResource(PersistenceManagerHolder resourceHolder, PersistenceManagerFactory resourceKey)
ResourceHolderSynchronization
releaseResource
in class ResourceHolderSynchronization<PersistenceManagerHolder,PersistenceManagerFactory>
resourceHolder
- the resource holder to processresourceKey
- the key that the ResourceHolder was bound for
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |