public class WSATGatewayRM extends Object implements XAResource, WSATRuntimeConfig.RecoveryEventListener
| Modifier and Type | Field and Description |
|---|---|
static boolean |
isReadyForRuntime |
static String |
txlogdir |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY| Modifier and Type | Method and Description |
|---|---|
void |
afterRecovery(boolean success,
boolean delegated,
String instance) |
void |
beforeRecovery(boolean delegated,
String instance) |
void |
commit(Xid xid,
boolean onePhase) |
static WSATGatewayRM |
create()
Called during tube/web service init
|
boolean |
detectedUnavailable()
Return true as WSATGatewayRM is always available, health should not change.
|
void |
end(Xid xid,
int flags) |
void |
forget(Xid xid) |
int |
getDelistFlag()
Always returns TMSUCCESS, avoids unnecessary suspend
|
static WSATGatewayRM |
getInstance()
called by transaction services for enlistment and used by HA delegation
|
int |
getTransactionTimeout()
Not applicable
|
boolean |
isSameRM(XAResource xares)
There is only one WSATGatewayRM per server for active transactions and isSameRM should not be called for
any migrated WSATGatewayRM instances
|
int |
prepare(Xid xid) |
void |
recover()
Used for lazy/automatic-recovery="false"
|
Xid[] |
recover(int flag)
Call for local recover/server specified by null instance value
|
Xid[] |
recover(int flag,
String instance)
Call for delegated recovery specified by non-null instance
|
Xid |
registerWSATResource(Xid xid,
XAResource wsatResource,
Transaction tx)
Enlist a foreign WS-AT resource in the current transaction.
|
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds)
Not applicable
|
void |
start(Xid xid,
int flags)
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
|
public static boolean isReadyForRuntime
public static String txlogdir
public static WSATGatewayRM getInstance()
public static WSATGatewayRM create()
public Xid registerWSATResource(Xid xid, XAResource wsatResource, Transaction tx) throws IllegalStateException, RollbackException, SystemException
xid - The current, superior transaction id.wsatResource - The foreign WS-AT resource.SystemException - from enlistResourceRollbackException - from enlistResourceIllegalStateException - from enlistResourcepublic void start(Xid xid, int flags) throws XAException
start in interface XAResourcexid - Xidflags - flagsXAException - xaExceptionpublic void end(Xid xid, int flags) throws XAException
end in interface XAResourceXAExceptionpublic int prepare(Xid xid) throws XAException
prepare in interface XAResourceXAExceptionpublic void commit(Xid xid, boolean onePhase) throws XAException
commit in interface XAResourceXAExceptionpublic void rollback(Xid xid) throws XAException
rollback in interface XAResourceXAExceptionpublic void recover()
public Xid[] recover(int flag) throws XAException
recover in interface XAResourceflag - XAExceptionpublic Xid[] recover(int flag, String instance) throws XAException
flag - instance - XAExceptionpublic void forget(Xid xid) throws XAException
forget in interface XAResourceXAExceptionpublic int getTransactionTimeout()
throws XAException
getTransactionTimeout in interface XAResourceXAExceptionpublic boolean setTransactionTimeout(int seconds)
throws XAException
setTransactionTimeout in interface XAResourceseconds - intXAException - xaExceptionpublic boolean isSameRM(XAResource xares) throws XAException
isSameRM in interface XAResourcexares - XAResourceXAExceptionpublic boolean detectedUnavailable()
public int getDelistFlag()
public void beforeRecovery(boolean delegated,
String instance)
beforeRecovery in interface WSATRuntimeConfig.RecoveryEventListenerpublic void afterRecovery(boolean success,
boolean delegated,
String instance)
afterRecovery in interface WSATRuntimeConfig.RecoveryEventListenerCopyright © 2005–2018 Oracle Corporation. All rights reserved.