- java.lang.Object
-
- org.datanucleus.transaction.ResourcedTransaction
-
public class ResourcedTransaction extends Object
Transaction allowing resources to be enlisted, with branches and phased commit, following the style of an Open/XA transaction. Enlisted resources are typically datastore resources which, in turn, need committing.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit()booleandelistResource(XAResource xaRes, int flag)booleanenlistResource(XAResource xaRes)intgetStatus()static StringgetXAErrorCode(Throwable xae)booleanisEnlisted(XAResource xaRes)voidregisterSynchronization(javax.transaction.Synchronization sync)voidrollback()voidsetRollbackOnly()StringtoString()
-
-
-
Field Detail
-
random
public static final Random random
Random number generator, for use when needing unique names.
-
-
Method Detail
-
getStatus
public int getStatus()
-
isEnlisted
public boolean isEnlisted(XAResource xaRes)
-
enlistResource
public boolean enlistResource(XAResource xaRes)
-
delistResource
public boolean delistResource(XAResource xaRes, int flag)
-
registerSynchronization
public void registerSynchronization(javax.transaction.Synchronization sync)
-
commit
public void commit()
-
rollback
public void rollback()
-
setRollbackOnly
public void setRollbackOnly()
-
-