Author: markt
Date: Fri Jul  2 18:25:54 2010
New Revision: 960081

URL: http://svn.apache.org/viewvc?rev=960081&view=rev
Log:
Further MBean improvements.
Patch provided by chamith buddhika

Removed:
    tomcat/trunk/java/org/apache/catalina/ha/mbeans-descriptors.xml
Modified:
    tomcat/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml
    tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java
    
tomcat/trunk/java/org/apache/catalina/tribes/membership/mbeans-descriptors.xml

Modified: tomcat/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml?rev=960081&r1=960080&r2=960081&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/tcp/mbeans-descriptors.xml Fri Jul 
 2 18:25:54 2010
@@ -24,36 +24,35 @@
     group="Cluster"
     type="org.apache.catalina.ha.tcp.SimpleTcpCluster">
     <attribute
-      name="info"
-      description="Class version info"
-      type="java.lang.String"
-      writeable="false"/>
+      name="channelSendOptions"
+      description="This sets channel behaviour on sent messages."
+      type="int"/>
     <attribute
-      name="notifyLifecycleListenerOnFailure"
-      description="notify lifecycleListener from message transfer failure"
-      is="true"
-      type="boolean"/>
+      name="channelStartOptions"
+      description="This sets channel start behaviour."
+      type="java.lang.String"/>
+    <attribute
+      name="clusterName"
+      description="name of cluster"
+      type="java.lang.String"/>
     <attribute
       name="heartbeatBackgroundEnabled"
       description="enable that container background thread call channel 
heartbeat, default is that channel mangage heartbeat itself."
       is="true"
       type="boolean"/>
     <attribute
-      name="clusterName"
-      description="name of cluster"
-      type="java.lang.String"/>
+      name="info"
+      description="Class version info"
+      type="java.lang.String"
+      writeable="false"/>
     <attribute
       name="managerClassName"
       description="session mananager classname"
       type="java.lang.String"/>
     <attribute
-      name="clusterLogName"
-      description="Name of cluster transfer log device"
-      type="java.lang.String"/>
-    <attribute
-      name="doClusterLog"
+      name="notifyLifecycleListenerOnFailure"
+      description="notify lifecycleListener from message transfer failure"
       is="true"
-      description="enable cluster log transfer logging"
       type="boolean"/>
     <operation
       name="setProperty"
@@ -1173,31 +1172,31 @@
     group="Valve"
     type="org.apache.catalina.ha.tcp.ReplicationValve">
     <attribute
-      name="info"
-      description="Class version info"
-      type="java.lang.String"
-      writeable="false"/>
-    <attribute
-      name="filter"
-      description="resource filter to disable session replication check"
-      type="java.lang.String"/>
-    <attribute
-      name="primaryIndicator"
-      is="true"
-      description="set indicator that request processing is at primary session 
node"
+      name="asyncSupported"
+      description="Does this valve support async reporting?"
       type="boolean"/>
     <attribute
-      name="primaryIndicatorName"
-      description="Request attribute name to indicate that request processing 
is at primary session node"
-      type="java.lang.String"/>
-    <attribute
       name="doProcessingStats"
       is="true"
       description="active statistics counting"
       type="boolean"/>
     <attribute
-      name="nrOfRequests"
-      description="number of replicated requests"
+      name="filter"
+      description="resource filter to disable session replication check"
+      type="java.lang.String"/>
+    <attribute
+      name="info"
+      description="Class version info"
+      type="java.lang.String"
+      writeable="false"/>
+    <attribute
+      name="lastSendTime"
+      description="last replicated request time"
+      type="long"
+      writeable="false"/>
+    <attribute
+      name="nrOfCrossContextSendRequests"
+      description="number of send cross context session requests"
       type="long"
       writeable="false"/>
     <attribute
@@ -1211,23 +1210,27 @@
       type="long"
       writeable="false"/>
     <attribute
-      name="nrOfCrossContextSendRequests"
-      description="number of send cross context session requests"
+      name="nrOfRequests"
+      description="number of replicated requests"
       type="long"
       writeable="false"/>
     <attribute
-      name="totalRequestTime"
-      description="total replicated request time"
-      type="long"
-      writeable="false"/>
+      name="primaryIndicator"
+      is="true"
+      description="set indicator that request processing is at primary session 
node"
+      type="boolean"/>
+    <attribute
+      name="primaryIndicatorName"
+      description="Request attribute name to indicate that request processing 
is at primary session node"
+      type="java.lang.String"/>
     <attribute
       name="totalSendTime"
       description="total replicated send time"
       type="long"
       writeable="false"/>
     <attribute
-      name="lastSendTime"
-      description="last replicated request time"
+      name="totalRequestTime"
+      description="total replicated request time"
       type="long"
       writeable="false"/>
     <operation

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java?rev=960081&r1=960080&r2=960081&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/McastService.java 
Fri Jul  2 18:25:54 2010
@@ -241,18 +241,50 @@ public class McastService implements Mem
     public void setRecoveryCounter(int recoveryCounter) {
         properties.setProperty("recoveryCounter", 
String.valueOf(recoveryCounter));
     }
+    
+    public int getRecoveryCounter(){
+       String p = properties.getProperty("recoveryCounter");
+       if(p != null){
+               return new Integer(p).intValue();
+       }
+       return -1;
+    }
 
     public void setRecoveryEnabled(boolean recoveryEnabled) {
         properties.setProperty("recoveryEnabled", 
String.valueOf(recoveryEnabled));
     }
+    
+    public boolean getRecoveryEnabled() {
+       String p = properties.getProperty("recoveryEnabled");
+       if(p != null){
+               return new Boolean(p).booleanValue();
+       }
+       return false;
+    }
 
     public void setRecoverySleepTime(long recoverySleepTime) {
         properties.setProperty("recoverySleepTime", 
String.valueOf(recoverySleepTime));
     }
+    
+    public long getRecoverySleepTime(){
+       String p = properties.getProperty("recoverySleepTime");
+       if(p != null){
+               return new Long(p).longValue();
+       }
+       return -1;
+    }
 
     public void setLocalLoopbackDisabled(boolean localLoopbackDisabled) {
         
properties.setProperty("localLoopbackDisabled",String.valueOf(localLoopbackDisabled));
     }
+    
+    public boolean getLocalLoopbackDisabled(boolean localLoopbackDisabled) {
+       String p = properties.getProperty("localLoopbackDisabled");
+       if(p != null){
+               return new Boolean(p).booleanValue();
+       }
+       return false;
+    }
 
     /**
      * @deprecated use getPort()

Modified: 
tomcat/trunk/java/org/apache/catalina/tribes/membership/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/mbeans-descriptors.xml?rev=960081&r1=960080&r2=960081&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/catalina/tribes/membership/mbeans-descriptors.xml 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/tribes/membership/mbeans-descriptors.xml 
Fri Jul  2 18:25:54 2010
@@ -24,41 +24,44 @@
     group="Cluster"
     type="org.apache.catalina.tribes.membership.McastService">
     <attribute
-      name="info"
-      description="Class version info"
-      type="java.lang.String"
-      writeable="false"/>
-    <attribute
-      name="mcastAddr"
+      name="address"
       description="Multicast IP Address"
       type="java.lang.String"/>
     <attribute
-      name="mcastBindAddress"
+      name="bind"
       description="Multicast IP Interface address (default auto)"
       type="java.lang.String"/>
     <attribute
-      name="mcastPort"
-      description="Multicast UDP Port"
-      type="int"/>
+      name="dropTime"
+      description="Timeout from frequency ping after member disapper notify"
+      type="long"/>
     <attribute
-      name="mcastFrequency"
+      name="frequency"
       description="Ping Frequency at msec"
       type="long"/>
     <attribute
-      name="mcastClusterDomain"
-      description="Cluster Domain of this member"
-      type="java.lang.String"/>
+      name="info"
+      description="Class version info"
+      type="java.lang.String"
+      writeable="false"/>
     <attribute
-      name="mcastDropTime"
-      description="Timeout from frequency ping after member disapper notify"
-      type="long"/>
+      name="localLoopbackDisabled"
+      description="Is local loopback disabled?"
+      is="true"
+      type="boolean"/>
     <attribute
-      name="mcastSoTimeout"
-      description="Multicast Socket Timeout"
-      type="int"/>
+      name="localMemberName"
+      description="Complete local receiver information"
+      type="java.lang.String"
+      writeable="false"/>
     <attribute
-      name="mcastTTL"
-      description=""
+      name="membersByName"
+      description="Complete remote sender information"
+      type="[Ljava.lang.String;"
+      writeable="false"/>
+    <attribute
+      name="port"
+      description="Multicast UDP Port"
       type="int"/>
     <attribute
       name="recoveryCounter"
@@ -74,15 +77,13 @@
       description="Sleep time between next socket recovery (5000 msec)"
       type="long"/>
     <attribute
-      name="localMemberName"
-      description="Complete local receiver information"
-      type="java.lang.String"
-      writeable="false"/>
+      name="soTimeout"
+      description="Multicast Socket Timeout"
+      type="int"/>
     <attribute
-      name="membersByName"
-      description="Complete remote sender information"
-      type="[Ljava.lang.String;"
-      writeable="false"/>
+      name="Ttl"
+      description=""
+      type="int"/>
     <operation
       name="start"
       description="Start the cluster membership"



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

Reply via email to