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 Details

    • ConnectionClosingSynchronization

      public ConnectionClosingSynchronization(jakarta.jms.Connection connection)
      Parameters:
      connection - connection to be closed.
  • Method Details

    • beforeCompletion

      public void beforeCompletion()
      Specified by:
      beforeCompletion in interface jakarta.transaction.Synchronization
    • afterCompletion

      public void afterCompletion(int status)
      Close the connection no matter what the status of the transaction is.
      Specified by:
      afterCompletion in interface jakarta.transaction.Synchronization
      Parameters:
      status - the status of the completed transaction