Class JmsTransactionalConnection
java.lang.Object
org.mule.jms.commons.internal.connection.JmsConnection
org.mule.jms.commons.internal.connection.JmsTransactionalConnection
- All Implemented Interfaces:
org.mule.runtime.api.lifecycle.Disposable,org.mule.runtime.api.lifecycle.Stoppable,org.mule.runtime.extension.api.connectivity.TransactionalConnection,org.mule.sdk.api.connectivity.TransactionalConnection,org.mule.sdk.api.tx.Transactional
- Direct Known Subclasses:
XaJmsTransactionalConnection
public class JmsTransactionalConnection
extends JmsConnection
implements org.mule.runtime.extension.api.connectivity.TransactionalConnection
Implementation of the
JmsConnection which implements TransactionalConnection for Transaction Support in the
JmsConnector- Since:
- 1.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
ConstructorsConstructorDescriptionJmsTransactionalConnection(JmsSupport jmsSupport, jakarta.jms.Connection connection, JmsSessionManager jmsSessionManager, CompositeJmsExceptionListener exceptionListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()Begins a new Transaction for a JMS Session indicating in theJmsSessionManagerthat the currentThreadis being part of a transaction.voidcommit()Executes a commit action over the boundJmsSessionto the currentThreadvoidrollback()Executes a rollback action over the boundJmsSessionto the currentThreadMethods inherited from class org.mule.jms.commons.internal.connection.JmsConnection
createConsumer, createConsumer, createProducer, createSession, dispose, get, getJmsSessionManager, getJmsSupport, registerExceptionListener, removeExceptionListener, setConnection, stop
-
Constructor Details
-
JmsTransactionalConnection
public JmsTransactionalConnection(JmsSupport jmsSupport, jakarta.jms.Connection connection, JmsSessionManager jmsSessionManager, CompositeJmsExceptionListener exceptionListener)
-
-
Method Details
-
begin
public void begin()Begins a new Transaction for a JMS Session indicating in theJmsSessionManagerthat the currentThreadis being part of a transaction.- Specified by:
beginin interfaceorg.mule.sdk.api.tx.Transactional
-
commit
public void commit() throws org.mule.runtime.api.tx.TransactionExceptionExecutes a commit action over the boundJmsSessionto the currentThread- Specified by:
commitin interfaceorg.mule.sdk.api.tx.Transactional- Throws:
org.mule.runtime.api.tx.TransactionException
-
rollback
public void rollback() throws org.mule.runtime.api.tx.TransactionExceptionExecutes a rollback action over the boundJmsSessionto the currentThread- Specified by:
rollbackin interfaceorg.mule.sdk.api.tx.Transactional- Throws:
org.mule.runtime.api.tx.TransactionException
-