Package com.sun.xml.ws.tx.at.internal
Class WSATGatewayRM
java.lang.Object
com.sun.xml.ws.tx.at.internal.WSATGatewayRM
- All Implemented Interfaces:
WSATRuntimeConfig.RecoveryEventListener,XAResource
public class WSATGatewayRM
extends Object
implements XAResource, WSATRuntimeConfig.RecoveryEventListener
Gateway XAResource for managing outbound WS-AT transaction branches.
-
Field Summary
FieldsFields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY -
Method Summary
Modifier and TypeMethodDescriptionvoidafterRecovery(boolean success, boolean delegated, String instance) Indicate to the listener that recovery is over.voidbeforeRecovery(boolean delegated, String instance) Indicate to the listener that recovery for a specific instance is about to start.voidstatic WSATGatewayRMcreate()Called during tube/web service initbooleanReturn true as WSATGatewayRM is always available, health should not change.voidvoidintAlways returns TMSUCCESS, avoids unnecessary suspendstatic WSATGatewayRMcalled by transaction services for enlistment and used by HA delegationintNot applicablebooleanisSameRM(XAResource xares) There is only one WSATGatewayRM per server for active transactions and isSameRM should not be called for any migrated WSATGatewayRM instancesintvoidrecover()Used for lazy/automatic-recovery="false"Xid[]recover(int flag) Call for local recover/server specified by null instance valueXid[]Call for delegated recovery specified by non-null instanceregisterWSATResource(Xid xid, XAResource wsatResource, jakarta.transaction.Transaction tx) Enlist a foreign WS-AT resource in the current transaction.voidbooleansetTransactionTimeout(int seconds) Not applicablevoidImplementation of Subordinate/ServerXAResource called in reaction to registerWSATResource enlistResource call This should be the only use/patch of this method NOTE: lock on currentBQual must be obtained before calling this method as it is in
-
Field Details
-
isReadyForRuntime
public static boolean isReadyForRuntime -
txlogdir
-
-
Method Details
-
getInstance
called by transaction services for enlistment and used by HA delegation -
create
Called during tube/web service init -
registerWSATResource
public Xid registerWSATResource(Xid xid, XAResource wsatResource, jakarta.transaction.Transaction tx) throws IllegalStateException, jakarta.transaction.RollbackException, jakarta.transaction.SystemException Enlist a foreign WS-AT resource in the current transaction. It is assumed that the XAResource parameter wraps a WS-AT endpoint. Invoked in the outbound case.- Parameters:
xid- The current, superior transaction id.wsatResource- The foreign WS-AT resource.- Returns:
- Xid xid
- Throws:
jakarta.transaction.SystemException- from enlistResourcejakarta.transaction.RollbackException- from enlistResourceIllegalStateException- from enlistResource
-
start
Implementation of Subordinate/ServerXAResource called in reaction to registerWSATResource enlistResource call This should be the only use/patch of this method NOTE: lock on currentBQual must be obtained before calling this method as it is in- Specified by:
startin interfaceXAResource- Parameters:
xid- Xidflags- flags- Throws:
XAException- xaException
-
end
- Specified by:
endin interfaceXAResource- Throws:
XAException
-
prepare
- Specified by:
preparein interfaceXAResource- Throws:
XAException
-
commit
- Specified by:
commitin interfaceXAResource- Throws:
XAException
-
rollback
- Specified by:
rollbackin interfaceXAResource- Throws:
XAException
-
recover
public void recover()Used for lazy/automatic-recovery="false" -
recover
Call for local recover/server specified by null instance value- Specified by:
recoverin interfaceXAResource- Returns:
- Xid[] indoubt Xids
- Throws:
XAException
-
recover
Call for delegated recovery specified by non-null instance- Returns:
- Xid[] indoubt Xids
- Throws:
XAException
-
forget
- Specified by:
forgetin interfaceXAResource- Throws:
XAException
-
getTransactionTimeout
public int getTransactionTimeout()Not applicable- Specified by:
getTransactionTimeoutin interfaceXAResource- Returns:
- int -1 as not applicable
-
setTransactionTimeout
public boolean setTransactionTimeout(int seconds) Not applicable- Specified by:
setTransactionTimeoutin interfaceXAResource- Parameters:
seconds- int- Returns:
- boolean always false as not applicable
-
isSameRM
There is only one WSATGatewayRM per server for active transactions and isSameRM should not be called for any migrated WSATGatewayRM instances- Specified by:
isSameRMin interfaceXAResource- Parameters:
xares- XAResource- Returns:
- boolean if is same RM which in this WSATGatewayRM case means means the same instance
-
getDelistFlag
public int getDelistFlag()Always returns TMSUCCESS, avoids unnecessary suspend- Returns:
- int TMSUCCESS delist flag
-
beforeRecovery
Description copied from interface:WSATRuntimeConfig.RecoveryEventListenerIndicate to the listener that recovery for a specific instance is about to start.- Specified by:
beforeRecoveryin interfaceWSATRuntimeConfig.RecoveryEventListener- Parameters:
delegated- identifies whether it is part of a delegated transaction recoveryinstance- the instance name for which transaction recovery is performed, null if unknown
-
afterRecovery
Description copied from interface:WSATRuntimeConfig.RecoveryEventListenerIndicate to the listener that recovery is over.- Specified by:
afterRecoveryin interfaceWSATRuntimeConfig.RecoveryEventListener- Parameters:
success-trueif the recovery operation finished successfullydelegated- identifies whether it is part of a delegated transaction recoveryinstance- the instance name for which transaction recovery is performed, null if unknown
-