com.sun.xml.ws.tx.common
Class ATTransactionImpl

java.lang.Object
  extended by com.sun.xml.ws.tx.common.ATTransactionImpl
All Implemented Interfaces:
ATTransaction, javax.transaction.Transaction

public class ATTransactionImpl
extends java.lang.Object
implements ATTransaction

Represents an WS-AT capable Transaction.

Also has reference to related Java EE transaction that it is associated with.


Constructor Summary
ATTransactionImpl(javax.transaction.Transaction jtaTxn, CoordinationContextInterface coordCtx)
          Creates a new instance of ATTransactionImpl
 
Method Summary
 void commit()
           
 boolean delistResource(javax.transaction.xa.XAResource xAResource, int state)
           
 boolean enlistParticipant(Participant participant)
          Enlist a participant with current WS-AT transaction context.
 boolean enlistResource(javax.transaction.xa.XAResource xaResource)
          Wrapper XAResource as a participant and enlist with this transaction's coordinator.
 void forget()
           
static ATTransactionImpl get(java.lang.String coordinationId)
           
 int getStatus()
           
 void registerSynchronization(javax.transaction.Synchronization synchronization)
           
 void rollback()
           
 void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ATTransactionImpl

public ATTransactionImpl(javax.transaction.Transaction jtaTxn,
                         CoordinationContextInterface coordCtx)
Creates a new instance of ATTransactionImpl

Method Detail

get

public static ATTransactionImpl get(java.lang.String coordinationId)

forget

public void forget()

commit

public void commit()
            throws javax.transaction.RollbackException,
                   javax.transaction.HeuristicMixedException,
                   javax.transaction.HeuristicRollbackException,
                   java.lang.SecurityException,
                   java.lang.IllegalStateException,
                   javax.transaction.SystemException
Specified by:
commit in interface javax.transaction.Transaction
Throws:
javax.transaction.RollbackException
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
javax.transaction.SystemException

delistResource

public boolean delistResource(javax.transaction.xa.XAResource xAResource,
                              int state)
                       throws java.lang.IllegalStateException,
                              javax.transaction.SystemException
Specified by:
delistResource in interface javax.transaction.Transaction
Throws:
java.lang.IllegalStateException
javax.transaction.SystemException

enlistResource

public boolean enlistResource(javax.transaction.xa.XAResource xaResource)
                       throws javax.transaction.RollbackException,
                              java.lang.IllegalStateException,
                              javax.transaction.SystemException
Wrapper XAResource as a participant and enlist with this transaction's coordinator.

Contemplating removing this method but leave for now.

XAResources from managed connections are automatically enlisted with Java EE transaction.

Specified by:
enlistResource in interface javax.transaction.Transaction
Throws:
javax.transaction.RollbackException
java.lang.IllegalStateException
javax.transaction.SystemException

enlistParticipant

public boolean enlistParticipant(Participant participant)
Description copied from interface: ATTransaction
Enlist a participant with current WS-AT transaction context.

Specified by:
enlistParticipant in interface ATTransaction
Returns:
true if the participant was enlisted successfully; otherwise false.

registerSynchronization

public void registerSynchronization(javax.transaction.Synchronization synchronization)
                             throws javax.transaction.RollbackException,
                                    java.lang.IllegalStateException,
                                    javax.transaction.SystemException
Specified by:
registerSynchronization in interface javax.transaction.Transaction
Throws:
javax.transaction.RollbackException
java.lang.IllegalStateException
javax.transaction.SystemException

rollback

public void rollback()
              throws java.lang.IllegalStateException,
                     javax.transaction.SystemException
Specified by:
rollback in interface javax.transaction.Transaction
Throws:
java.lang.IllegalStateException
javax.transaction.SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws java.lang.IllegalStateException,
                            javax.transaction.SystemException
Specified by:
setRollbackOnly in interface javax.transaction.Transaction
Throws:
java.lang.IllegalStateException
javax.transaction.SystemException

getStatus

public int getStatus()
              throws javax.transaction.SystemException
Specified by:
getStatus in interface javax.transaction.Transaction
Throws:
javax.transaction.SystemException