spring-framework / org.springframework.jms.connection / ConnectionFactoryUtils / releaseConnection

releaseConnection

open static fun releaseConnection(@Nullable con: Connection, @Nullable cf: ConnectionFactory, started: Boolean): Unit

Release the given Connection, stopping it (if necessary) and eventually closing it.

Checks SmartConnectionFactory#shouldStop, if available. This is essentially a more sophisticated version of org.springframework.jms.support.JmsUtils#closeConnection.

Parameters

con - the Connection to release (if this is null, the call will be ignored)

cf - the ConnectionFactory that the Connection was obtained from (may be null)

started - whether the Connection might have been started by the application

See Also
SmartConnectionFactory#shouldStoporg.springframework.jms.support.JmsUtils#closeConnection