activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r380104 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
Date Thu, 23 Feb 2006 12:28:46 GMT
Author: jstrachan
Date: Thu Feb 23 04:28:45 2006
New Revision: 380104

URL: http://svn.apache.org/viewcvs?rev=380104&view=rev
Log:
added better debug logging

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java?rev=380104&r1=380103&r2=380104&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/WireFormatNegotiator.java
Thu Feb 23 04:28:45 2006
@@ -23,12 +23,16 @@
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.WireFormatInfo;
 import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
 
 
 public class WireFormatNegotiator extends TransportFilter {
 
+    private static final Log log = LogFactory.getLog(WireFormatNegotiator.class);
+    
     private final WireFormat wireFormat;
     private final int minimumVersion;
     
@@ -79,6 +83,10 @@
     public void onCommand(Command command) {
         if( command.isWireFormatInfo() ) {
             WireFormatInfo info = (WireFormatInfo) command;
+            if (log.isDebugEnabled()) {
+                log.debug("Received WireFormat: " + info + " with version: 0x" + Integer.toString(info.getVersion(),
16));
+            }
+            
             if( !info.isValid() ) {
                 commandListener.onException(new IOException("Remote wire format magic is
invalid"));
             } else if( info.getVersion() < minimumVersion ) {



Mime
View raw message