Class ActiveMQXAResourceWrapperImpl
- java.lang.Object
-
- org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapperImpl
-
- All Implemented Interfaces:
XAResource,ActiveMQXAResourceWrapper
public class ActiveMQXAResourceWrapperImpl extends Object implements ActiveMQXAResourceWrapper
-
-
Field Summary
-
Fields inherited from interface org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapper
ACTIVEMQ_JNDI_NAME, ACTIVEMQ_NODE_ID, ACTIVEMQ_PRODUCT_NAME, ACTIVEMQ_PRODUCT_VERSION
-
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
-
Constructor Summary
Constructors Constructor Description ActiveMQXAResourceWrapperImpl(XAResource xaResource, Map<String,Object> properties)Creates a new XAResourceWrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit(Xid xid, boolean b)voidend(Xid xid, int i)voidforget(Xid xid)StringgetJndiName()StringgetProductName()StringgetProductVersion()XAResourcegetResource()intgetTransactionTimeout()booleanisSameRM(XAResource xaResource)intprepare(Xid xid)Xid[]recover(int i)voidrollback(Xid xid)booleansetTransactionTimeout(int i)voidstart(Xid xid, int i)
-
-
-
Constructor Detail
-
ActiveMQXAResourceWrapperImpl
public ActiveMQXAResourceWrapperImpl(XAResource xaResource, Map<String,Object> properties)
Creates a new XAResourceWrapper. PRODUCT_NAME, productVersion and jndiName are useful for log output in the Transaction Manager. For ActiveMQ Artemis only the resourceManagerID is required to allow Transaction Manager to recover from relevant recovery scenarios.- Parameters:
xaResource-properties-
-
-
Method Detail
-
getResource
public XAResource getResource()
-
getProductName
public String getProductName()
-
getProductVersion
public String getProductVersion()
-
getJndiName
public String getJndiName()
-
commit
public void commit(Xid xid, boolean b) throws XAException
- Specified by:
commitin interfaceXAResource- Throws:
XAException
-
end
public void end(Xid xid, int i) throws XAException
- Specified by:
endin interfaceXAResource- Throws:
XAException
-
forget
public void forget(Xid xid) throws XAException
- Specified by:
forgetin interfaceXAResource- Throws:
XAException
-
getTransactionTimeout
public int getTransactionTimeout() throws XAException- Specified by:
getTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
isSameRM
public boolean isSameRM(XAResource xaResource) throws XAException
- Specified by:
isSameRMin interfaceXAResource- Throws:
XAException
-
prepare
public int prepare(Xid xid) throws XAException
- Specified by:
preparein interfaceXAResource- Throws:
XAException
-
recover
public Xid[] recover(int i) throws XAException
- Specified by:
recoverin interfaceXAResource- Throws:
XAException
-
rollback
public void rollback(Xid xid) throws XAException
- Specified by:
rollbackin interfaceXAResource- Throws:
XAException
-
setTransactionTimeout
public boolean setTransactionTimeout(int i) throws XAException- Specified by:
setTransactionTimeoutin interfaceXAResource- Throws:
XAException
-
start
public void start(Xid xid, int i) throws XAException
- Specified by:
startin interfaceXAResource- Throws:
XAException
-
-