You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2007/01/09 17:28:29 UTC

svn commit: r494478 - /incubator/qpid/branches/perftesting/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java

Author: ritchiem
Date: Tue Jan  9 08:28:28 2007
New Revision: 494478

URL: http://svn.apache.org/viewvc?view=rev&rev=494478
Log:
Added Logging to diagnose exceptionCaught when a local RuntimeException occurs.

Modified:
    incubator/qpid/branches/perftesting/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java

Modified: incubator/qpid/branches/perftesting/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/perftesting/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java?view=diff&rev=494478&r1=494477&r2=494478
==============================================================================
--- incubator/qpid/branches/perftesting/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java (original)
+++ incubator/qpid/branches/perftesting/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java Tue Jan  9 08:28:28 2007
@@ -254,15 +254,20 @@
             //if (!(cause instanceof AMQUndeliveredException) && (!(cause instanceof AMQAuthenticationException)))
             if (cause instanceof AMQConnectionClosedException)
             {
-                _logger.info("Exception caught therefore going to attempt failover: " + cause, cause);
-                // this will attemp failover
+                _logger.info("Exception caught by ProtocolHandler therefore going to attempt failover: " + cause, cause);
 
+                // this will attempt failover
                 sessionClosed(session);
             }
+            else
+            {
+                _logger.info("Exception caught by ProtocolHandler:" + cause, cause);
+                //sessionClosed(session);
+            }
         }
         // we reach this point if failover was attempted and failed therefore we need to let the calling app
         // know since we cannot recover the situation
-        else if (_failoverState == FailoverState.FAILED)
+        else if ((_failoverState == FailoverState.FAILED)) //|| (_failoverState == FailoverState.IN_PROGRESS))
         {
             _logger.error("Exception caught by protocol handler: " + cause, cause);
             // we notify the state manager of the error in case we have any clients waiting on a state
@@ -270,6 +275,7 @@
             AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
             propagateExceptionToWaiters(amqe);
             _connection.exceptionReceived(cause);
+
         }
     }