com.sun.xml.ws.tx.at.internal
Class TransactionServicesImpl

java.lang.Object
  extended by com.sun.xml.ws.tx.at.internal.TransactionServicesImpl
All Implemented Interfaces:
TransactionServices

public class TransactionServicesImpl
extends Object
implements TransactionServices


Method Summary
 void commit(byte[] tId)
          Called by Participant endpoint to commit tx/subordinate branch
 Xid enlistResource(XAResource resource, Xid xid)
          Called by Registraion Service during register call in order to enlist WSAT XAResource (this is essentially the WSAT participant EPR wrapper that is serialized for recovery) and return branchqual in order to create RegisterResponseType
 byte[] getGlobalTransactionId()
          The tx id of the tx on this thread
static TransactionServices getInstance()
           
 EndpointReference getParentReference(Xid xid)
          Called from Participant service to get the Coordinator(PortType) for this Xid
 Xid importTransaction(int timeout, byte[] tId)
          Called by server tube (WSATServerHelper) to infect thread with tx
 String prepare(byte[] tId)
          Called by Participant endpoint to prepare tx/subordinate branch
 void registerSynchronization(Synchronization synchronization, Xid xid)
          Called by Registration service to register a volatile participant
 void replayCompletion(String tId, XAResource xaResource)
          Called by Coordinator replay operation Bottom-up recovery call, as in JTS, a hint to resend
 void rollback(byte[] tId)
          Called by Participant endpoint to prepare tx/subordinate branch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static TransactionServices getInstance()

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Description copied from interface: TransactionServices
The tx id of the tx on this thread

Specified by:
getGlobalTransactionId in interface TransactionServices
Returns:
byte[] tid

enlistResource

public Xid enlistResource(XAResource resource,
                          Xid xid)
                   throws WSATException
Description copied from interface: TransactionServices
Called by Registraion Service during register call in order to enlist WSAT XAResource (this is essentially the WSAT participant EPR wrapper that is serialized for recovery) and return branchqual in order to create RegisterResponseType

Specified by:
enlistResource in interface TransactionServices
Parameters:
resource - (WSAT)XAResource
xid - Xid
Returns:
byte[] branchqual to use for
Throws:
WSATException - any error during enlist as WSAT GatewayRM

registerSynchronization

public void registerSynchronization(Synchronization synchronization,
                                    Xid xid)
                             throws WSATException
Description copied from interface: TransactionServices
Called by Registration service to register a volatile participant

Specified by:
registerSynchronization in interface TransactionServices
Parameters:
synchronization - javax.transaction.Synchronization
xid - Xid
Throws:
WSATException - wsatXAResource

importTransaction

public Xid importTransaction(int timeout,
                             byte[] tId)
                      throws WSATException
Description copied from interface: TransactionServices
Called by server tube (WSATServerHelper) to infect thread with tx

Specified by:
importTransaction in interface TransactionServices
Parameters:
timeout - timeout/ttl
tId - byte[]
Throws:
WSATException - wsatXAResource

prepare

public String prepare(byte[] tId)
               throws WSATException
Description copied from interface: TransactionServices
Called by Participant endpoint to prepare tx/subordinate branch

Specified by:
prepare in interface TransactionServices
Parameters:
tId - byte[]
Returns:
String vote, see WSATConstants
Throws:
WSATException - wsatXAResource

commit

public void commit(byte[] tId)
            throws WSATException
Description copied from interface: TransactionServices
Called by Participant endpoint to commit tx/subordinate branch

Specified by:
commit in interface TransactionServices
Parameters:
tId - byte[]
Throws:
WSATException - wsatXAResource

rollback

public void rollback(byte[] tId)
              throws WSATException
Description copied from interface: TransactionServices
Called by Participant endpoint to prepare tx/subordinate branch

Specified by:
rollback in interface TransactionServices
Parameters:
tId - byte[]
Throws:
WSATException - wsatXAResource

replayCompletion

public void replayCompletion(String tId,
                             XAResource xaResource)
                      throws WSATException
Description copied from interface: TransactionServices
Called by Coordinator replay operation Bottom-up recovery call, as in JTS, a hint to resend

Specified by:
replayCompletion in interface TransactionServices
Parameters:
tId - byte[]
xaResource - (WSAT)XAResource
Throws:
WSATException - wsatXAResource

getParentReference

public EndpointReference getParentReference(Xid xid)
Description copied from interface: TransactionServices
Called from Participant service to get the Coordinator(PortType) for this Xid

Specified by:
getParentReference in interface TransactionServices
Parameters:
xid - Xid
Returns:
EndpointReference of Coordinator (as obtained from earlier RegisterResponse)


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.