See gh-32610
@ -575,14 +575,11 @@ public class SingleConnectionFactory implements ConnectionFactory, QueueConnecti
logger.debug("Closing shared JMS Connection: " + con);
}
try {
try (con) {
if (this.startedCount > 0) {
con.stop();
finally {
con.close();
catch (jakarta.jms.IllegalStateException ex) {
logger.debug("Ignoring Connection state exception - assuming already closed: " + ex);