You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2007/11/19 11:05:15 UTC

svn commit: r596245 - /servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java

Author: gertv
Date: Mon Nov 19 02:05:14 2007
New Revision: 596245

URL: http://svn.apache.org/viewvc?rev=596245&view=rev
Log:
SM-1132: Closing the JMS connection pools

Modified:
    servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java

Modified: servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java
URL: http://svn.apache.org/viewvc/servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java?rev=596245&r1=596244&r2=596245&view=diff
==============================================================================
--- servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java (original)
+++ servicemix/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java Mon Nov 19 02:05:14 2007
@@ -81,10 +81,12 @@
     @Override
     public void shutDown() throws JBIException {
         super.shutDown();
-        try {
-            factory.stop();
-        } catch (Exception e) {
-            log.warn("Unable to stop JMS connection pool: " + e.getMessage(), e);
+        if (factory != null) {
+            try {
+                factory.stop();
+            } catch (Exception e) {
+                log.warn("Unable to stop JMS connection pool: " + e.getMessage(), e);
+            }
         }
     }
 }