org.jboss.wst11.xts.impl
Class AbstractTransactionBridgeManagerImpl

java.lang.Object
  extended by org.jboss.wst11.xts.impl.AbstractTransactionBridgeManagerImpl
All Implemented Interfaces:
WSTransactionBridgeManager
Direct Known Subclasses:
TransactionBridgeManagerImpl, TransactionBridgeManagerImpl

public abstract class AbstractTransactionBridgeManagerImpl
extends java.lang.Object
implements WSTransactionBridgeManager

Author:
wklaczynski@sabaservice.pl, 2007-04-30

Field Summary
private static org.apache.log4j.Logger log
           
private static java.util.concurrent.ConcurrentMap<java.lang.String,com.arjuna.ats.jta.transaction.Transaction> txIdMappings
           
private static java.util.concurrent.ConcurrentMap<com.arjuna.ats.jta.transaction.Transaction,WSTransactionBridge> txJtaSubBridgeMappings
           
private static java.util.concurrent.ConcurrentMap<java.lang.String,WSTransactionBridge> txXtsSubBridgeMappings
           
private static java.util.concurrent.ConcurrentMap<com.arjuna.ats.jta.transaction.Transaction,java.lang.String> xidMappings
           
 
Constructor Summary
AbstractTransactionBridgeManagerImpl()
           
 
Method Summary
private  java.lang.String createClientMappings(com.arjuna.ats.jta.transaction.Transaction transaction)
           
private  com.arjuna.ats.jta.transaction.Transaction createServiceMappings(java.lang.String txId, long timeout)
           
static com.arjuna.mwlabs.wst11.at.context.TxContextImple createSubordinateTransaction(long timeout, com.arjuna.mw.wst.TxContext currentTransaction)
           
private static org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext currentCoordinationContext(com.arjuna.mw.wst.TxContext context)
           
static void disassociateClientBridge(com.arjuna.ats.jta.transaction.Transaction transaction)
           
static void disassociateServiceBridge(java.lang.String txId)
           
protected abstract  com.arjuna.wst.Durable2PCParticipant getBridgeParticipantAT(javax.transaction.xa.Xid xid)
           
 WSTransactionBridge getClientTransactionBridge()
           
 WSTransactionBridge getServiceTransactionBridge()
           
protected abstract  com.arjuna.ats.jta.transaction.Transaction getSubordinateTransaction(javax.transaction.xa.Xid xid, long timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Logger log

txIdMappings

private static java.util.concurrent.ConcurrentMap<java.lang.String,com.arjuna.ats.jta.transaction.Transaction> txIdMappings

xidMappings

private static java.util.concurrent.ConcurrentMap<com.arjuna.ats.jta.transaction.Transaction,java.lang.String> xidMappings

txJtaSubBridgeMappings

private static java.util.concurrent.ConcurrentMap<com.arjuna.ats.jta.transaction.Transaction,WSTransactionBridge> txJtaSubBridgeMappings

txXtsSubBridgeMappings

private static java.util.concurrent.ConcurrentMap<java.lang.String,WSTransactionBridge> txXtsSubBridgeMappings
Constructor Detail

AbstractTransactionBridgeManagerImpl

public AbstractTransactionBridgeManagerImpl()
Method Detail

getServiceTransactionBridge

public WSTransactionBridge getServiceTransactionBridge()
                                                throws javax.transaction.SystemException
Specified by:
getServiceTransactionBridge in interface WSTransactionBridgeManager
Returns:
Service transaction bridge
Throws:
javax.transaction.SystemException

getClientTransactionBridge

public WSTransactionBridge getClientTransactionBridge()
                                               throws javax.transaction.SystemException
Specified by:
getClientTransactionBridge in interface WSTransactionBridgeManager
Returns:
Client transaction bridge
Throws:
javax.transaction.SystemException

createServiceMappings

private com.arjuna.ats.jta.transaction.Transaction createServiceMappings(java.lang.String txId,
                                                                         long timeout)
                                                                  throws javax.transaction.xa.XAException,
                                                                         javax.transaction.SystemException,
                                                                         com.arjuna.wst.WrongStateException,
                                                                         com.arjuna.wst.UnknownTransactionException,
                                                                         com.arjuna.wsc.AlreadyRegisteredException,
                                                                         com.arjuna.wst.SystemException
Throws:
javax.transaction.xa.XAException
javax.transaction.SystemException
com.arjuna.wst.WrongStateException
com.arjuna.wst.UnknownTransactionException
com.arjuna.wsc.AlreadyRegisteredException

createClientMappings

private java.lang.String createClientMappings(com.arjuna.ats.jta.transaction.Transaction transaction)
                                       throws com.arjuna.wst.SystemException,
                                              javax.transaction.SystemException,
                                              com.arjuna.wst.WrongStateException,
                                              com.arjuna.wst.UnknownTransactionException,
                                              com.arjuna.wsc.InvalidCreateParametersException,
                                              com.arjuna.webservices.SoapFault,
                                              java.lang.IllegalStateException,
                                              javax.transaction.RollbackException,
                                              com.arjuna.wsc.InvalidProtocolException,
                                              com.arjuna.wsc.InvalidStateException,
                                              com.arjuna.wsc.NoActivityException,
                                              com.arjuna.mw.wst.exceptions.SystemException,
                                              com.arjuna.mw.wsas.exceptions.NoActivityException,
                                              com.arjuna.mw.wsas.exceptions.SystemException,
                                              com.arjuna.mw.wsas.exceptions.WrongStateException,
                                              java.lang.Exception
Throws:
com.arjuna.wst.SystemException
com.arjuna.wst.WrongStateException
com.arjuna.wst.UnknownTransactionException
com.arjuna.wsc.InvalidCreateParametersException
com.arjuna.webservices.SoapFault
java.lang.IllegalStateException
javax.transaction.RollbackException
com.arjuna.wsc.InvalidProtocolException
com.arjuna.wsc.InvalidStateException
com.arjuna.wsc.NoActivityException
java.lang.Exception

getSubordinateTransaction

protected abstract com.arjuna.ats.jta.transaction.Transaction getSubordinateTransaction(javax.transaction.xa.Xid xid,
                                                                                        long timeout)
                                                                                 throws javax.transaction.xa.XAException
Parameters:
xid -
timeout -
Returns:
New or imported subordinate transaction
Throws:
javax.transaction.xa.XAException

getBridgeParticipantAT

protected abstract com.arjuna.wst.Durable2PCParticipant getBridgeParticipantAT(javax.transaction.xa.Xid xid)
Parameters:
xid -
Returns:
New created bridge participant

disassociateServiceBridge

public static void disassociateServiceBridge(java.lang.String txId)
Parameters:
txId -

disassociateClientBridge

public static void disassociateClientBridge(com.arjuna.ats.jta.transaction.Transaction transaction)
Parameters:
transaction -

createSubordinateTransaction

public static com.arjuna.mwlabs.wst11.at.context.TxContextImple createSubordinateTransaction(long timeout,
                                                                                             com.arjuna.mw.wst.TxContext currentTransaction)
                                                                                      throws com.arjuna.wsc.NoActivityException,
                                                                                             com.arjuna.wsc.InvalidProtocolException,
                                                                                             javax.transaction.SystemException,
                                                                                             com.arjuna.mw.wsas.exceptions.NoActivityException,
                                                                                             com.arjuna.mw.wsas.exceptions.SystemException,
                                                                                             javax.transaction.RollbackException,
                                                                                             com.arjuna.wsc.InvalidCreateParametersException
Parameters:
timeout -
currentTransaction -
Returns:
New created XTS subordinate transaction
Throws:
com.arjuna.wsc.NoActivityException
com.arjuna.wsc.InvalidProtocolException
javax.transaction.SystemException
com.arjuna.mw.wsas.exceptions.NoActivityException
com.arjuna.mw.wsas.exceptions.SystemException
javax.transaction.RollbackException
com.arjuna.wsc.InvalidCreateParametersException

currentCoordinationContext

private static org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContext currentCoordinationContext(com.arjuna.mw.wst.TxContext context)
                                                                                                  throws javax.transaction.SystemException
Throws:
javax.transaction.SystemException