activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r453629 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Date Fri, 06 Oct 2006 15:02:43 GMT
Author: aco
Date: Fri Oct  6 08:02:42 2006
New Revision: 453629

URL: http://svn.apache.org/viewvc?view=rev&rev=453629
Log:
Minor update: Check for null first before using the object.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java?view=diff&rev=453629&r1=453628&r2=453629
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java
Fri Oct  6 08:02:42 2006
@@ -581,12 +581,12 @@
         
         ConnectionState cs = lookupConnectionState(connectionId);
         SessionState session = cs.getSessionState(id);
-        
-        // Don't let new consumers or producers get added while we are closing this down.
-        session.shutdown();
-        
+
         if( session == null )
             throw new IllegalStateException("Cannot remove session that had not been registered:
"+id);
+
+        // Don't let new consumers or producers get added while we are closing this down.
+        session.shutdown();
         
         // Cascade the connection stop to the consumers and producers.
         for (Iterator iter = session.getConsumerIds().iterator(); iter.hasNext();) {



Mime
View raw message