public class ActiveMQXAResourceWrapper extends Object implements XAResource, SessionFailureListener
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
Constructor and Description |
---|
ActiveMQXAResourceWrapper(XARecoveryConfig... xaRecoveryConfigs) |
Modifier and Type | Method and Description |
---|---|
void |
beforeReconnect(ActiveMQException me)
Notifies that a connection has failed due to the specified exception.
|
protected XAException |
check(XAException e)
Check whether an XAException is fatal.
|
void |
close()
Close the connection
|
void |
commit(Xid xid,
boolean onePhase) |
protected XAResource |
connect()
Connect to the server if not already done so
|
void |
connectionFailed(ActiveMQException me,
boolean failedOver)
Notifies that a connection has failed due to the specified exception.
|
void |
connectionFailed(ActiveMQException me,
boolean failedOver,
String scaleDownTargetNodeID)
Notifies that a connection has failed due to the specified exception.
|
void |
end(Xid xid,
int flags) |
protected void |
finalize() |
void |
forget(Xid xid) |
int |
getTransactionTimeout() |
boolean |
isSameRM(XAResource xaRes) |
int |
prepare(Xid xid) |
Xid[] |
recover(int flag) |
void |
rollback(Xid xid) |
boolean |
setTransactionTimeout(int seconds) |
void |
start(Xid xid,
int flags) |
String |
toString() |
public ActiveMQXAResourceWrapper(XARecoveryConfig... xaRecoveryConfigs)
public Xid[] recover(int flag) throws XAException
recover
in interface XAResource
XAException
public void commit(Xid xid, boolean onePhase) throws XAException
commit
in interface XAResource
XAException
public void rollback(Xid xid) throws XAException
rollback
in interface XAResource
XAException
public void forget(Xid xid) throws XAException
forget
in interface XAResource
XAException
public boolean isSameRM(XAResource xaRes) throws XAException
isSameRM
in interface XAResource
XAException
public int prepare(Xid xid) throws XAException
prepare
in interface XAResource
XAException
public void start(Xid xid, int flags) throws XAException
start
in interface XAResource
XAException
public void end(Xid xid, int flags) throws XAException
end
in interface XAResource
XAException
public int getTransactionTimeout() throws XAException
getTransactionTimeout
in interface XAResource
XAException
public boolean setTransactionTimeout(int seconds) throws XAException
setTransactionTimeout
in interface XAResource
XAException
public void connectionFailed(ActiveMQException me, boolean failedOver)
FailureListener
connectionFailed
in interface FailureListener
me
- exception which has caused the connection to failpublic void connectionFailed(ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID)
FailureListener
connectionFailed
in interface FailureListener
me
- exception which has caused the connection to failscaleDownTargetNodeID
- the ID of the node to which messages are scaling downpublic void beforeReconnect(ActiveMQException me)
SessionFailureListener
beforeReconnect
in interface SessionFailureListener
me
- exception which has caused the connection to failprotected XAResource connect() throws Exception
Exception
- for any problempublic void close()
protected XAException check(XAException e) throws XAException
e
- the xa exceptionXAException
- alwaysCopyright © 2021 JBoss by Red Hat. All rights reserved.