Class XATerminator
java.lang.Object
com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple
com.arjuna.ats.internal.jbossatx.jts.jca.XATerminator
- All Implemented Interfaces:
XATerminatorExtensions
,jakarta.resource.spi.XATerminator
,org.jboss.tm.ExtendedJBossXATerminator
,org.jboss.tm.JBossXATerminator
The implementation of JBossXATerminator using the JTS implementation of the
JTA.
- Author:
- mcl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancelWork
(jakarta.resource.spi.work.Work work, Xid xid) Remove the associated work from the transaction.void
Disassociate the thread from the transaction and remove the work from the transaction pool of workers.void
registerWork
(jakarta.resource.spi.work.Work work, Xid xid, long timeout) Register the unit of work with the specified transaction.void
Associate the current thread with the specified transaction.Methods inherited from class com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple
beforeCompletion, commit, doRecover, forget, getCurrentTransactionId, getImportedTransaction, getTransaction, getTransactionById, getXidsToRecoverForParentNode, importTransaction, isRecoveryByNodeOrXidSupported, prepare, recover, removeImportedTransaction, rollback
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.resource.spi.XATerminator
commit, forget, prepare, recover, rollback
-
Constructor Details
-
XATerminator
public XATerminator()
-
-
Method Details
-
registerWork
public void registerWork(jakarta.resource.spi.work.Work work, Xid xid, long timeout) throws jakarta.resource.spi.work.WorkCompletedException Register the unit of work with the specified transaction. The thread-to-transaction association is not changed yet. Basically this operation only lets the transaction system know about the work and nothing else.- Specified by:
registerWork
in interfaceorg.jboss.tm.JBossXATerminator
- Parameters:
work
- the work to associate with the transaction.xid
- the transaction within which the work will be performed.timeout
- the lifetime of the transaction.- Throws:
jakarta.resource.spi.work.WorkCompletedException
- thrown if the work cannot be associated with the transactin.
-
startWork
public void startWork(jakarta.resource.spi.work.Work work, Xid xid) throws jakarta.resource.spi.work.WorkCompletedException Associate the current thread with the specified transaction. In JBoss 4.x, they assume that the work has already been registered, so we do likewise, i.e., we don't do a register if it hasn't, but we will throw an exception (which is more than JBoss does).- Specified by:
startWork
in interfaceorg.jboss.tm.JBossXATerminator
- Parameters:
work
- the Work to startxid
- the transaction to associate with the current thread.- Throws:
jakarta.resource.spi.work.WorkCompletedException
- thrown if there are any errors.
-
endWork
Disassociate the thread from the transaction and remove the work from the transaction pool of workers. This assumes that the invoking thread is the one doing the work.- Specified by:
endWork
in interfaceorg.jboss.tm.JBossXATerminator
- Parameters:
work
- the Work unit to remove.xid
- the transaction to remove the work from.
-
cancelWork
Remove the associated work from the transaction. Do not do any thread-to-transaction disassociation.- Specified by:
cancelWork
in interfaceorg.jboss.tm.JBossXATerminator
- Parameters:
work
- the unit of work to remove.xid
- the transaction from which it should be disassociated.
-