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:
com.arjuna.ats.internal.jta.resources.spi.XATerminatorExtensions,jakarta.resource.spi.XATerminator,org.jboss.tm.ExtendedJBossXATerminator,org.jboss.tm.JBossXATerminator
public class XATerminator extends com.arjuna.ats.internal.jta.transaction.jts.jca.XATerminatorImple implements org.jboss.tm.JBossXATerminatorThe implementation of JBossXATerminator using the JTS implementation of the JTA.- Author:
- mcl
-
-
Constructor Summary
Constructors Constructor Description XATerminator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelWork(jakarta.resource.spi.work.Work work, Xid xid)Remove the associated work from the transaction.voidendWork(jakarta.resource.spi.work.Work work, Xid xid)Disassociate the thread from the transaction and remove the work from the transaction pool of workers.voidregisterWork(jakarta.resource.spi.work.Work work, Xid xid, long timeout)Register the unit of work with the specified transaction.voidstartWork(jakarta.resource.spi.work.Work work, Xid xid)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
-
-
-
-
Method Detail
-
registerWork
public void registerWork(jakarta.resource.spi.work.Work work, Xid xid, long timeout) throws jakarta.resource.spi.work.WorkCompletedExceptionRegister 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:
registerWorkin 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.WorkCompletedExceptionAssociate 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:
startWorkin 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
public void endWork(jakarta.resource.spi.work.Work work, Xid xid)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:
endWorkin interfaceorg.jboss.tm.JBossXATerminator- Parameters:
work- the Work unit to remove.xid- the transaction to remove the work from.
-
cancelWork
public void cancelWork(jakarta.resource.spi.work.Work work, Xid xid)Remove the associated work from the transaction. Do not do any thread-to-transaction disassociation.- Specified by:
cancelWorkin interfaceorg.jboss.tm.JBossXATerminator- Parameters:
work- the unit of work to remove.xid- the transaction from which it should be disassociated.
-
-