tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r620533 - in /tomcat/trunk/java/org/apache/catalina: ha/tcp/SimpleTcpCluster.java tribes/membership/MemberImpl.java tribes/transport/nio/NioReceiver.java
Date Mon, 11 Feb 2008 17:29:10 GMT
Author: fhanik
Date: Mon Feb 11 09:29:06 2008
New Revision: 620533

URL: http://svn.apache.org/viewvc?rev=620533&view=rev
Log:
Corrected use of Channel.getMembers() in cluster
Added debug hints to warning messages based on what may be wrong

Modified:
    tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
    tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java
    tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java?rev=620533&r1=620532&r2=620533&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java (original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java Mon Feb 11 09:29:06
2008
@@ -824,8 +824,9 @@
                 } else
                     log.error("Unable to send message to local member " + msg);
             } else {
-                if (channel.getMembers().length>0)
-                    channel.send(channel.getMembers(),msg,channelSendOptions);
+                Member[] destmembers = channel.getMembers();
+                if (destmembers.length>0)
+                    channel.send(destmembers,msg,channelSendOptions);
                 else if (log.isDebugEnabled()) 
                     log.debug("No members in cluster, ignoring message:"+msg);
             }

Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java?rev=620533&r1=620532&r2=620533&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java Mon Feb 11 09:29:06
2008
@@ -319,7 +319,7 @@
         int pos = offset;
         
         if (XByteBuffer.firstIndexOf(data,offset,TRIBES_MBR_BEGIN)!=pos) {
-            throw new IllegalArgumentException("Invalid package, should start with:"+org.apache.catalina.tribes.util.Arrays.toString(TRIBES_MBR_BEGIN));
+            throw new IllegalArgumentException("Invalid package, should start with:"+org.apache.catalina.tribes.util.Arrays.toString(TRIBES_MBR_BEGIN)+"
Possibly an incompatible client broadcasting on the same multicast address.");
         }
 
         if ( length < (TRIBES_MBR_BEGIN.length+4) ) {

Modified: tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java?rev=620533&r1=620532&r2=620533&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java Mon Feb 11
09:29:06 2008
@@ -202,10 +202,8 @@
                     if ( ka != null ) {
                         long delta = now - ka.getLastAccess();
                         if (delta > (long) getTimeout() && (!ka.isAccessed()))
{
-                            log.warn("Channel key is registered, but has had no interest
ops for the last "+getTimeout()+" ms. (cancelled:"+ka.isCancelled()+"):"+key+" last access:"+new
java.sql.Timestamp(ka.getLastAccess()));
-//                            System.out.println("Interest:"+key.interestOps());
-//                            System.out.println("Ready Ops:"+key.readyOps());
-//                            System.out.println("Valid:"+key.isValid());
+                            if (log.isWarnEnabled()) 
+                                log.warn("Channel key is registered, but has had no interest
ops for the last "+getTimeout()+" ms. (cancelled:"+ka.isCancelled()+"):"+key+" last access:"+new
java.sql.Timestamp(ka.getLastAccess())+" Possible cause: all threads used, perform thread
dump");
                             ka.setLastAccess(now);
                             //key.interestOps(SelectionKey.OP_READ);
                         }//end if



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message