Package org.jboss.narayana.jta.jms
Class JmsXAResourceRecoveryHelper
java.lang.Object
org.jboss.narayana.jta.jms.JmsXAResourceRecoveryHelper
- All Implemented Interfaces:
XAResourceRecoveryHelper,XAResource
public class JmsXAResourceRecoveryHelper
extends Object
implements XAResourceRecoveryHelper, XAResource
- Author:
- Gytis Trikleris
-
Field Summary
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY -
Constructor Summary
ConstructorsConstructorDescriptionJmsXAResourceRecoveryHelper(jakarta.jms.XAConnectionFactory xaConnectionFactory) JmsXAResourceRecoveryHelper(jakarta.jms.XAConnectionFactory xaConnectionFactory, String user, String pass) JmsXAResourceRecoveryHelper(ConnectionManager connectionManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidDelegates XAResource#commit call to the connected JMS resource.voidDelegates XAResource#end call to the connected JMS resource.voidDelegates XAResource#forget call to the connected JMS resource.intDelegates XAResource#getTransactionTimeout call to the connected JMS resource.If JMS connection was created successfully, returns an array with one instance of JmsXAResourceRecoveryHelper.booleaninitialise(String properties) Nothing to initialise.booleanisSameRM(XAResource xaResource) Delegates XAResource#isSameRM call to the connected JMS resource.intDelegates XAResource#prepare call to the connected JMS resource.Xid[]recover(int flag) Delegates XAResource#recover call to the connected JMS resource.voidDelegates XAResource#rollback call to the connected JMS resource.booleansetTransactionTimeout(int seconds) Delegates XAResource#setTransactionTimeout call to the connected JMS resource.voidDelegates XAResource#start call to the connected JMS resource.
-
Constructor Details
-
JmsXAResourceRecoveryHelper
public JmsXAResourceRecoveryHelper(jakarta.jms.XAConnectionFactory xaConnectionFactory) -
JmsXAResourceRecoveryHelper
-
JmsXAResourceRecoveryHelper
-
-
Method Details
-
initialise
Nothing to initialise.- Specified by:
initialisein interfaceXAResourceRecoveryHelper- Parameters:
properties-- Returns:
- Always returns true
-
getXAResources
If JMS connection was created successfully, returns an array with one instance of JmsXAResourceRecoveryHelper. Otherwise, returns an empty array.- Specified by:
getXAResourcesin interfaceXAResourceRecoveryHelper- Returns:
- Array with one instance of JmsXAResourceRecoveryHelper or an empty array
-
recover
Delegates XAResource#recover call to the connected JMS resource. If provided argument is XAResource.TMENDRSCAN, then JMS connection will be closed at the end of the call.- Specified by:
recoverin interfaceXAResource- Parameters:
flag-- Throws:
XAException
-
start
Delegates XAResource#start call to the connected JMS resource.- Specified by:
startin interfaceXAResource- Parameters:
xid-flag-- Throws:
XAException
-
end
Delegates XAResource#end call to the connected JMS resource.- Specified by:
endin interfaceXAResource- Parameters:
xid-flag-- Throws:
XAException
-
prepare
Delegates XAResource#prepare call to the connected JMS resource.- Specified by:
preparein interfaceXAResource- Parameters:
xid-- Returns:
- Prepare outcome
- Throws:
XAException
-
commit
Delegates XAResource#commit call to the connected JMS resource.- Specified by:
commitin interfaceXAResource- Parameters:
xid-onePhase-- Throws:
XAException
-
rollback
Delegates XAResource#rollback call to the connected JMS resource.- Specified by:
rollbackin interfaceXAResource- Parameters:
xid-- Throws:
XAException
-
isSameRM
Delegates XAResource#isSameRM call to the connected JMS resource.- Specified by:
isSameRMin interfaceXAResource- Parameters:
xaResource-- Returns:
- True if is same resource manager or false if not.
- Throws:
XAException
-
forget
Delegates XAResource#forget call to the connected JMS resource.- Specified by:
forgetin interfaceXAResource- Parameters:
xid-- Throws:
XAException
-
getTransactionTimeout
Delegates XAResource#getTransactionTimeout call to the connected JMS resource.- Specified by:
getTransactionTimeoutin interfaceXAResource- Returns:
- Transaction timeout value.
- Throws:
XAException
-
setTransactionTimeout
Delegates XAResource#setTransactionTimeout call to the connected JMS resource.- Specified by:
setTransactionTimeoutin interfaceXAResource- Parameters:
seconds-- Returns:
- True if transaction timeout was set, or false if wasn't.
- Throws:
XAException
-