Class EsbConnectionManager.PublishingSessionLease
java.lang.Object
com.kingsrook.qqq.esb.connection.EsbConnectionManager.PublishingSessionLease
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
EsbConnectionManager
public static final class EsbConnectionManager.PublishingSessionLease
extends Object
implements AutoCloseable
One exclusive publication. The session must not escape this lease or be
used after commit/close. Only commit success permits reuse; any other exit
rolls back and discards the session, including failed producer cleanup.
-
Method Details
-
getSession
public jakarta.jms.Session getSession()The JMS session is owned exclusively by this publication. -
commit
public void commit() throws jakarta.jms.JMSExceptionCommit once, only while this connection generation remains current.- Throws:
jakarta.jms.JMSException
-
close
public void close()Never return an unsuccessful or obsolete session to the pool.- Specified by:
closein interfaceAutoCloseable
-