org.jboss.wst.xts.impl
Class AbstractTransactionBridgeManagerImpl

java.lang.Object
  extended by org.jboss.wst.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)
           
 com.arjuna.mwlabs.wst.at.context.TxContextImple createSubordinateTransaction(long timeout, com.arjuna.mw.wst.TxContext currentTransaction)
           
static com.arjuna.webservices.wscoor.CoordinationContextType 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:
return service transaction bridge
Throws:
javax.transaction.SystemException

getClientTransactionBridge

public WSTransactionBridge getClientTransactionBridge()
                                               throws javax.transaction.SystemException
Specified by:
getClientTransactionBridge in interface WSTransactionBridgeManager
Returns:
return 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:
return local subordinate transaction
Throws:
javax.transaction.xa.XAException

getBridgeParticipantAT

protected abstract com.arjuna.wst.Durable2PCParticipant getBridgeParticipantAT(javax.transaction.xa.Xid xid)
Parameters:
xid -
Returns:
return xts participant from the subordinate transaction management

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 com.arjuna.mwlabs.wst.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:
return context to 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

public static com.arjuna.webservices.wscoor.CoordinationContextType currentCoordinationContext(com.arjuna.mw.wst.TxContext context)
                                                                                        throws javax.transaction.SystemException
Parameters:
context -
Returns:
return context to current transaction
Throws:
javax.transaction.SystemException