You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/03/17 12:19:16 UTC

svn commit: r386610 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java

Author: jstrachan
Date: Fri Mar 17 03:19:12 2006
New Revision: 386610

URL: http://svn.apache.org/viewcvs?rev=386610&view=rev
Log:
fix for AMQ-600 to detect IOExceptions as being transport exceptions, not service exceptions (which are normally things like JMSException or security exceptions etc) and then disposing the connection eagerly - to free up the clientID so that the client can reconnect

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/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/AbstractConnection.java?rev=386610&r1=386609&r2=386610&view=diff
==============================================================================
--- 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 Mar 17 03:19:12 2006
@@ -169,7 +169,12 @@
     }
         
     public void serviceException(Throwable e) {
-        if( !disposed && !inServiceException ) {
+        // are we a transport exception such as not being able to dispatch
+        // synchronously to a transport
+        if (e instanceof IOException) {
+            serviceTransportException((IOException) e);
+        }
+        else if( !disposed && !inServiceException ) {
             inServiceException = true;
                 try {
                 serviceLog.info("Async error occurred: "+e,e);