cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r946960 - /cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Date Fri, 21 May 2010 09:53:19 GMT
Author: ema
Date: Fri May 21 09:53:18 2010
New Revision: 946960

URL: http://svn.apache.org/viewvc?rev=946960&view=rev
Log:
[CXF-2788]:Close all the connection when bus shutdown

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=946960&r1=946959&r2=946960&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Fri May 21 09:53:18 2010
@@ -59,6 +59,7 @@ import org.apache.cxf.transport.jms.cont
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
 import org.apache.cxf.wsdl.EndpointReferenceUtils;
 import org.springframework.jms.connection.JmsResourceHolder;
+import org.springframework.jms.connection.SingleConnectionFactory;
 import org.springframework.jms.core.JmsTemplate;
 import org.springframework.jms.core.MessageCreator;
 import org.springframework.jms.core.SessionCallback;
@@ -115,6 +116,12 @@ public class JMSDestination extends Abst
     public void deactivate() {
         if (jmsListener != null) {
             jmsListener.shutdown();
+            // CXF-2788: SingleConnectionFactory ignores the call to
+            // javax.jms.Connection#close(),
+            // use this to really close the target connection.
+            if (jmsListener.getConnectionFactory() instanceof SingleConnectionFactory) {
+                ((SingleConnectionFactory)jmsListener.getConnectionFactory()).destroy();
+            }
         }
     }
 



Mime
View raw message