We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d40868 commit 82b5147Copy full SHA for 82b5147
spring-jms/src/main/java/org/springframework/jms/connection/SingleConnectionFactory.java
@@ -575,14 +575,11 @@ protected void closeConnection(Connection con) {
575
logger.debug("Closing shared JMS Connection: " + con);
576
}
577
try {
578
- try {
+ try (con) {
579
if (this.startedCount > 0) {
580
con.stop();
581
582
583
- finally {
584
- con.close();
585
- }
586
587
catch (jakarta.jms.IllegalStateException ex) {
588
logger.debug("Ignoring Connection state exception - assuming already closed: " + ex);
0 commit comments