org.jboss.jca.core.tx.jbossts
Class XATerminatorImpl

java.lang.Object
  extended by org.jboss.jca.core.tx.jbossts.XATerminatorImpl
All Implemented Interfaces:
javax.resource.spi.XATerminator

public class XATerminatorImpl
extends Object
implements org.jboss.jca.core.spi.transaction.xa.XATerminator

XATerminator implementation

Author:
Jesper Pedersen

Constructor Summary
XATerminatorImpl(org.jboss.tm.JBossXATerminator delegator)
          Constructor
 
Method Summary
 void cancelWork(javax.resource.spi.work.Work work, Xid xid)
          Invoked when the work fails
 void commit(Xid xid, boolean onePhase)
          
 void endWork(javax.resource.spi.work.Work work, Xid xid)
          Invoked when transaction inflow work ends
 void forget(Xid xid)
          
 int prepare(Xid xid)
          
 Xid[] recover(int flags)
          
 void registerWork(javax.resource.spi.work.Work work, Xid xid, long timeout)
          Invoked for transaction inflow of work
 void rollback(Xid xid)
          
 void startWork(javax.resource.spi.work.Work work, Xid xid)
          Invoked for transaction inflow of work
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XATerminatorImpl

public XATerminatorImpl(org.jboss.tm.JBossXATerminator delegator)
Constructor

Parameters:
delegator - The delegator
Method Detail

commit

public void commit(Xid xid,
                   boolean onePhase)
            throws XAException

Specified by:
commit in interface javax.resource.spi.XATerminator
Throws:
XAException

forget

public void forget(Xid xid)
            throws XAException

Specified by:
forget in interface javax.resource.spi.XATerminator
Throws:
XAException

prepare

public int prepare(Xid xid)
            throws XAException

Specified by:
prepare in interface javax.resource.spi.XATerminator
Throws:
XAException

recover

public Xid[] recover(int flags)
              throws XAException

Specified by:
recover in interface javax.resource.spi.XATerminator
Throws:
XAException

rollback

public void rollback(Xid xid)
              throws XAException

Specified by:
rollback in interface javax.resource.spi.XATerminator
Throws:
XAException

registerWork

public void registerWork(javax.resource.spi.work.Work work,
                         Xid xid,
                         long timeout)
                  throws javax.resource.spi.work.WorkCompletedException
Invoked for transaction inflow of work

Parameters:
work - The work starting
xid - The xid of the work
timeout - The transaction timeout
Throws:
javax.resource.spi.work.WorkCompletedException - with error code WorkException.TX_CONCURRENT_WORK_DISALLOWED when work is already present for the xid or whose completion is in progress, only the global part of the xid must be used for this check.

startWork

public void startWork(javax.resource.spi.work.Work work,
                      Xid xid)
               throws javax.resource.spi.work.WorkCompletedException
Invoked for transaction inflow of work

Parameters:
work - The work starting
xid - The xid of the work
Throws:
javax.resource.spi.work.WorkCompletedException - With error code WorkException.TX_RECREATE_FAILED if it is unable to recreate the transaction context

endWork

public void endWork(javax.resource.spi.work.Work work,
                    Xid xid)
Invoked when transaction inflow work ends

Parameters:
work - The work ending
xid - The xid of the work

cancelWork

public void cancelWork(javax.resource.spi.work.Work work,
                       Xid xid)
Invoked when the work fails

Parameters:
work - The work ending
xid - The xid of the work


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)