We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2ef6dc commit 8543a55Copy full SHA for 8543a55
spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java
@@ -305,9 +305,15 @@ else if (methodName.equals("close")) {
305
if (active) {
306
synchronized (this.sessionList) {
307
if (this.sessionList.size() < getSessionCacheSize()) {
308
- logicalClose((Session) proxy);
309
- // Remain open in the session list.
310
- return null;
+ try {
+ logicalClose((Session) proxy);
+ // Remain open in the session list.
311
+ return null;
312
+ }
313
+ catch (JMSException ex) {
314
+ logger.trace("Logical close of cached JMS Session failed - discarding it", ex);
315
+ // Proceed to physical close from here...
316
317
}
318
319
0 commit comments