Class SessionClosingSynchronization

java.lang.Object
org.jboss.narayana.jta.jms.SessionClosingSynchronization
All Implemented Interfaces:
jakarta.transaction.Synchronization

public class SessionClosingSynchronization extends Object implements jakarta.transaction.Synchronization
Synchronization to close JMS session at the end of the transaction.
Author:
Gytis Trikleris
  • Constructor Details

    • SessionClosingSynchronization

      public SessionClosingSynchronization(AutoCloseable session)
      Parameters:
      session - session 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 session 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