Class XaJmsTransactionalConnection
java.lang.Object
org.mule.jms.commons.internal.connection.JmsConnection
org.mule.jms.commons.internal.connection.JmsTransactionalConnection
org.mule.jms.commons.internal.connection.XaJmsTransactionalConnection
- All Implemented Interfaces:
org.mule.runtime.api.lifecycle.Disposable,org.mule.runtime.api.lifecycle.Stoppable,org.mule.runtime.extension.api.connectivity.TransactionalConnection,org.mule.runtime.extension.api.connectivity.XATransactionalConnection,org.mule.sdk.api.connectivity.TransactionalConnection,org.mule.sdk.api.connectivity.XATransactionalConnection,org.mule.sdk.api.tx.Transactional
public class XaJmsTransactionalConnection
extends JmsTransactionalConnection
implements org.mule.runtime.extension.api.connectivity.XATransactionalConnection
JMS connection created when using a
ConnectionFactory with XA enabled.
This class provides all the functionality required to work with Bitronix Transaction Manager.- Since:
- 1.4.0
-
Field Summary
Fields inherited from interface org.mule.runtime.api.lifecycle.Disposable
PHASE_NAMEFields inherited from interface org.mule.runtime.api.lifecycle.Stoppable
PHASE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionXaJmsTransactionalConnection(JmsSupport jmsSupport, jakarta.jms.Connection connection, JmsSessionManager jmsSessionManager, CompositeJmsExceptionListener exceptionListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleanups all the resources associated with the session.getSession(InternalAckMode ackMode, boolean isTopic) Provides access to theJmsSessionto be used.This method gets called when there's an XA transaction in context.Methods inherited from class org.mule.jms.commons.internal.connection.JmsTransactionalConnection
begin, commit, rollbackMethods inherited from class org.mule.jms.commons.internal.connection.JmsConnection
createConsumer, createConsumer, createProducer, createSession, dispose, get, getJmsSessionManager, getJmsSupport, registerExceptionListener, removeExceptionListener, setConnection, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.mule.sdk.api.tx.Transactional
begin, commit, rollback
-
Constructor Details
-
XaJmsTransactionalConnection
public XaJmsTransactionalConnection(JmsSupport jmsSupport, jakarta.jms.Connection connection, JmsSessionManager jmsSessionManager, CompositeJmsExceptionListener exceptionListener)
-
-
Method Details
-
getXAResource
This method gets called when there's an XA transaction in context. It can be invoked even before the XAJmsTransactionalConnection get used to retrieve theJmsSession.- Specified by:
getXAResourcein interfaceorg.mule.sdk.api.connectivity.XATransactionalConnection
-
getSession
public JmsSession getSession(InternalAckMode ackMode, boolean isTopic) throws jakarta.jms.JMSException Provides access to theJmsSessionto be used. If there's a transactional context with a session already attached then that session will be returned. Otherwise a new session will be created.- Throws:
jakarta.jms.JMSException
-
close
public void close()Cleanups all the resources associated with the session.- Specified by:
closein interfaceorg.mule.sdk.api.connectivity.XATransactionalConnection
-