You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pe...@apache.org on 2005/07/01 20:35:54 UTC

cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp ClusterReceiverBase.java LocalStrings.properties SocketReplicationListener.java mbeans-descriptors.xml

pero        2005/07/01 11:35:54

  Modified:    modules/cluster/src/share/org/apache/catalina/cluster/tcp
                        ClusterReceiverBase.java LocalStrings.properties
                        SocketReplicationListener.java
                        mbeans-descriptors.xml
  Log:
  Fix timeout handling!
  
  Revision  Changes    Path
  1.8       +2 -2      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java
  
  Index: ClusterReceiverBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/ClusterReceiverBase.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ClusterReceiverBase.java	1 Jul 2005 14:26:02 -0000	1.7
  +++ ClusterReceiverBase.java	1 Jul 2005 18:35:54 -0000	1.8
  @@ -303,7 +303,7 @@
               Thread t = new Thread(this, "ClusterReceiver");
               t.setDaemon(true);
               t.start();
  -         } catch (Exception x) {
  +        } catch (Exception x) {
               log.fatal("Unable to start cluster receiver", x);
           }
           registerReceiverMBean();
  
  
  
  1.13      +1 -1      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/LocalStrings.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- LocalStrings.properties	1 Jul 2005 14:26:02 -0000	1.12
  +++ LocalStrings.properties	1 Jul 2005 18:35:54 -0000	1.13
  @@ -55,5 +55,5 @@
   SocketReplictionListener.openclose.failure=ServerSocket [{0}:{1}] - Exception to open or close server socket
   SocketReplictionListener.portbusy=Port busy at [{0}:{i}] - reason [{2}]
   SocketReplictionListener.serverSocket.notExists=Fatal error: Receiver socket not bound address={0} port={1} maxport={2}
  -SocketReplictionListener.timeout=Receiver ServerSocket no started [{0}:{1}] - timeout
  +SocketReplictionListener.timeout=Receiver ServerSocket no started [{0}:{1}] - reason: timeout={2} or listen={3}
   SocketReplictionListener.unlockSocket.failure=UnLocksocket failure at ServerSocket [{0:{1}]
  
  
  
  1.5       +5 -4      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SocketReplicationListener.java
  
  Index: SocketReplicationListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/SocketReplicationListener.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SocketReplicationListener.java	1 Jul 2005 14:26:02 -0000	1.4
  +++ SocketReplicationListener.java	1 Jul 2005 18:35:54 -0000	1.5
  @@ -111,7 +111,7 @@
           super.start();
           long reqStart = System.currentTimeMillis();
           long reqNow = 0 ;
  -        boolean isTimeout = true ;
  +        boolean isTimeout = false ;
           do {
               try {
                   Thread.sleep(50);
  @@ -119,10 +119,11 @@
               }
               reqNow = System.currentTimeMillis();
               isTimeout = ((reqNow - reqStart) > (1000 * getTcpListenTimeout()));
  -        } while (doListen && (!isTimeout));
  +        } while (!doListen && (!isTimeout));
           if (isTimeout || (!doListen)) {
               log.error(sm.getString("SocketReplictionListener.timeout",
  -                    getTcpListenAddress(),Integer.toString(getTcpListenPort())));
  +                    getTcpListenAddress(),Integer.toString(getTcpListenPort()),
  +                    Long.toString(reqNow - reqStart), Boolean.toString(doListen)));
           }
       }
       
  
  
  
  1.14      +3 -0      jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/tcp/mbeans-descriptors.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mbeans-descriptors.xml	1 Jul 2005 16:51:14 -0000	1.13
  +++ mbeans-descriptors.xml	1 Jul 2005 18:35:54 -0000	1.14
  @@ -197,6 +197,9 @@
       <attribute   name="tcpListenMaxPort"
             description="max tcp listen used port"
                    type="int"/>
  +    <attribute   name="tcpListenTimeout"
  +          description="max tcp listen timeout (sec) wait for ServerSocket start"
  +                 type="int"/>                
       <attribute   name="nrOfMsgsReceived"
             description="number of messages received from other nodes"
                    type="long"
  
  
  

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