Package org.jboss.narayana.jta.jms
Class ConnectionClosingSynchronization
java.lang.Object
org.jboss.narayana.jta.jms.ConnectionClosingSynchronization
- All Implemented Interfaces:
jakarta.transaction.Synchronization
public class ConnectionClosingSynchronization
extends Object
implements jakarta.transaction.Synchronization
Synchronization to close JMS connection at the end of the transaction.
- Author:
- Gytis Trikleris
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterCompletion
(int status) Close the connection no matter what the status of the transaction is.void
-
Constructor Details
-
ConnectionClosingSynchronization
public ConnectionClosingSynchronization(jakarta.jms.Connection connection) - Parameters:
connection
- connection to be closed.
-
-
Method Details
-
beforeCompletion
public void beforeCompletion()- Specified by:
beforeCompletion
in interfacejakarta.transaction.Synchronization
-
afterCompletion
public void afterCompletion(int status) Close the connection no matter what the status of the transaction is.- Specified by:
afterCompletion
in interfacejakarta.transaction.Synchronization
- Parameters:
status
- the status of the completed transaction
-