qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r811326 - in /qpid/branches/java-network-refactor/qpid/java: broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java
Date Fri, 04 Sep 2009 09:40:32 GMT
Author: aidan
Date: Fri Sep  4 09:40:32 2009
New Revision: 811326

URL: http://svn.apache.org/viewvc?rev=811326&view=rev
Log:
QPID-2025: Log errors instead of printStackTracing()

Modified:
    qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
    qpid/branches/java-network-refactor/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java?rev=811326&r1=811325&r2=811326&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
(original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
Fri Sep  4 09:40:32 2009
@@ -227,7 +227,7 @@
                         }
                         catch (Exception e)
                         {
-                            e.printStackTrace();
+                            _logger.error("Unexpected exception when processing datablock",
e);
                             closeProtocolSession();
                         }
                     }
@@ -236,7 +236,7 @@
         }
         catch (Exception e)
         {
-            e.printStackTrace();
+            _logger.error("Unexpected exception when processing datablock", e);
             closeProtocolSession();
         }
     }

Modified: qpid/branches/java-network-refactor/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java?rev=811326&r1=811325&r2=811326&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java
(original)
+++ qpid/branches/java-network-refactor/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MINANetworkDriver.java
Fri Sep  4 09:40:32 2009
@@ -30,13 +30,13 @@
 
 import javax.net.ssl.SSLEngine;
 
+import org.apache.log4j.Logger;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IdleStatus;
 import org.apache.mina.common.IoAcceptor;
 import org.apache.mina.common.IoFilterChain;
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
-import org.apache.mina.common.IoSessionConfig;
 import org.apache.mina.common.SimpleByteBufferAllocator;
 import org.apache.mina.common.WriteFuture;
 import org.apache.mina.filter.ReadThrottleFilterBuilder;
@@ -80,6 +80,8 @@
 
     private WriteFuture _lastWriteFuture;
 
+    private static final Logger _logger = Logger.getLogger(MINANetworkDriver.class);
+    
     public MINANetworkDriver(boolean useNIO, int processors, boolean executorPool, boolean
protectIO)
     {
         _useNIO = useNIO;
@@ -289,6 +291,10 @@
         if (_protocolEngine != null)
         {
             _protocolEngine.exception(throwable);
+        } 
+        else
+        {
+            _logger.error("Exception thrown and no ProtocolEngine to handle it", throwable);
         }
         _lastException = throwable;
     }



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message