[jboss-cvs] JBossAS SVN: r106011 - in trunk: tomcat/src/main/java/org/jboss/web/tomcat/service/session and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jun 12 21:03:48 EDT 2010


Author: bstansberry at jboss.com
Date: 2010-06-12 21:03:47 -0400 (Sat, 12 Jun 2010)
New Revision: 106011

Added:
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/mbeans-descriptors.xml
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/persistent/mbeans-descriptors.xml
Modified:
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/ClusteringDefaultsTestCase.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManagerMBean.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManager.java
   trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManagerMBean.java
Log:
[JBAS-5874][JBAS-5878] Conform to the standard Tomcat Manager mbean interface

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/ClusteringDefaultsTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/ClusteringDefaultsTestCase.java	2010-06-12 16:20:34 UTC (rev 106010)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/web/test/ClusteringDefaultsTestCase.java	2010-06-13 01:03:47 UTC (rev 106011)
@@ -21,7 +21,9 @@
  */
 package org.jboss.test.cluster.defaultcfg.web.test;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.management.Attribute;
 import javax.management.MBeanServerConnection;
@@ -58,34 +60,41 @@
       MBeanServerConnection server = this.getServer();
       
       String[] names = new String[] {
-            "CacheConfigName",
-            "UseJK",
-            "ReplicationGranularity",
-            "ReplicationTrigger",
-            "SnapshotMode",
-            "SnapshotInterval",
-            "MaxUnreplicatedInterval",
-            "PassivationEnabled",
-            "PassivationMaxIdleTime",
-            "PassivationMinIdleTime"
+            "cacheConfigName",
+            "useJK",
+            "replicationGranularity",
+            "replicationTrigger",
+            "snapshotMode",
+            "snapshotInterval",
+            "maxUnreplicatedInterval",
+            "passivationEnabled",
+            "passivationMaxIdleTime",
+            "passivationMinIdleTime"
       };
       
       List<Attribute> attributes = server.getAttributes(name, names).asList();
+      Map<String, Attribute> namedAttributes = new HashMap<String, Attribute>();
+      for (Attribute attr : attributes)
+      {
+         namedAttributes.put(attr.getName(), attr);
+      }
       
-      this.assertEquals(attributes.get(0), "CacheConfigName", "standard-session-cache");
-      this.assertEquals(attributes.get(1), "UseJK", Boolean.TRUE);
-      this.assertEquals(attributes.get(2), "ReplicationGranularity", ReplicationGranularity.SESSION);
-      this.assertEquals(attributes.get(3), "ReplicationTrigger", ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
-      this.assertEquals(attributes.get(4), "SnapshotMode", SnapshotMode.INSTANT);
-      this.assertEquals(attributes.get(5), "SnapshotInterval", Integer.valueOf(1000));
-      this.assertEquals(attributes.get(6), "MaxUnreplicatedInterval", Integer.valueOf(60));
-      this.assertEquals(attributes.get(7), "PassivationEnabled", Boolean.FALSE);
-      this.assertEquals(attributes.get(8), "PassivationMaxIdleTime", Long.valueOf(ClusteringDefaultsDeployer.IGNORED));
-      this.assertEquals(attributes.get(9), "PassivationMinIdleTime", Long.valueOf(ClusteringDefaultsDeployer.IGNORED));
+      this.assertCorrectAttribute(namedAttributes, "cacheConfigName", "standard-session-cache");
+      this.assertCorrectAttribute(namedAttributes, "useJK", Boolean.TRUE);
+      this.assertCorrectAttribute(namedAttributes, "replicationGranularity", ReplicationGranularity.SESSION);
+      this.assertCorrectAttribute(namedAttributes, "replicationTrigger", ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
+      this.assertCorrectAttribute(namedAttributes, "snapshotMode", SnapshotMode.INSTANT);
+      this.assertCorrectAttribute(namedAttributes, "snapshotInterval", Integer.valueOf(1000));
+      this.assertCorrectAttribute(namedAttributes, "maxUnreplicatedInterval", Integer.valueOf(60));
+      this.assertCorrectAttribute(namedAttributes, "passivationEnabled", Boolean.FALSE);
+      this.assertCorrectAttribute(namedAttributes, "passivationMaxIdleTime", Long.valueOf(ClusteringDefaultsDeployer.IGNORED));
+      this.assertCorrectAttribute(namedAttributes, "passivationMinIdleTime", Long.valueOf(ClusteringDefaultsDeployer.IGNORED));
    }
    
-   private void assertEquals(Attribute attribute, String name, Object value)
+   private void assertCorrectAttribute(Map<String, Attribute> namedAttributes, String name, Object value)
    {
+      Attribute attribute = namedAttributes.get(name);
+      Assert.assertNotNull("Attribute " + name + " found", attribute);
       Assert.assertEquals(name, attribute.getName());
       Assert.assertEquals(name, value, attribute.getValue());
    }

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java	2010-06-12 16:20:34 UTC (rev 106010)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManager.java	2010-06-13 01:03:47 UTC (rev 106011)
@@ -1019,6 +1019,14 @@
    {
       return duplicates_.get();
    }
+   
+   /**
+    * {@inheritDoc}
+    */
+   public void setDuplicates(int duplicates)
+   {
+      this.duplicates_.set(duplicates);
+   }
 
    /**
     * {@inheritDoc}
@@ -1112,6 +1120,15 @@
    {
       return (passivationMode_ && proxy_.isPassivationEnabled());
    }
+   
+   /**
+    * Same as {@link #isPassivationEnabled()}-- mbeans-descriptors.xml-sytle JMX 
+    * integration seems to require "get" instead of "is"
+    */
+   public boolean getPassivationEnabled()
+   {
+      return isPassivationEnabled();
+   }
 
    /**
     * {@inheritDoc}

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManagerMBean.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManagerMBean.java	2010-06-12 16:20:34 UTC (rev 106010)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossCacheManagerMBean.java	2010-06-13 01:03:47 UTC (rev 106011)
@@ -96,15 +96,6 @@
    ReplicationTrigger getReplicationTrigger();
    
    /**
-    * Gets whether batching of field granularity changes will be done.  Only
-    * relevant with replication granularity FIELD.
-    * 
-    * @return <code>true</code> if per-request batching will be done, 
-    *         <code>false</code> if not, <code>null</code> if not configured
-    */
-   Boolean isReplicationFieldBatchMode();
-   
-   /**
     * Gets whether JK is being used and special handling of a jvmRoute
     * portion of session ids is needed.
     */
@@ -224,4 +215,11 @@
     * Gets the number of duplicated session ids generated.
     */
    int getDuplicates();
+   
+   /**
+    * Sets the number of duplicated session ids generated.
+    * 
+    * @param duplicates the number of duplicates session ids
+    */
+   void setDuplicates(int duplicates);
 }

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManager.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManager.java	2010-06-12 16:20:34 UTC (rev 106010)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManager.java	2010-06-13 01:03:47 UTC (rev 106011)
@@ -57,6 +57,7 @@
 import org.jboss.web.tomcat.service.session.distributedcache.spi.ClusteringNotSupportedException;
 import org.jboss.web.tomcat.service.session.distributedcache.spi.OutgoingDistributableSessionData;
 import org.jboss.web.tomcat.statistics.ReplicationStatistics;
+import org.jfree.util.Log;
 
 
 /**
@@ -524,6 +525,14 @@
    {
       return this.processingTime_.get();
    }
+   
+   /**
+    * {@inheritDoc}
+    */
+   public void setProcessingTime(long time)
+   {
+      this.processingTime_.set(time);
+   }
 
    /**
     * {@inheritDoc}
@@ -533,10 +542,12 @@
       return rejectedCounter_.get();
    }
 
-   /** No-op */
+   /**
+    * {@inheritDoc}
+    */
    public void setRejectedSessions(int rejectedSessions)
    {
-      // ignored
+      this.rejectedCounter_.set(rejectedSessions);
    }
 
    /**
@@ -561,10 +572,12 @@
       return createdCounter_.get();
    }
 
-   /** No-op */
+   /**
+    * {@inheritDoc}
+    */
    public void setSessionCounter(int sessionCounter)
    {
-      // ignored
+      this.createdCounter_.set(sessionCounter);
    }
 
    /**
@@ -589,10 +602,12 @@
        return maxAliveTime.get();
    }
 
-   /** No-op */
+   /**
+    * {@inheritDoc}
+    */
    public void setSessionMaxAliveTime(int sessionAliveTime)
    {
-      // ignored
+      this.maxAliveTime.set(sessionAliveTime);
    }
 
    /** Throws UnsupportedOperationException */
@@ -686,10 +701,84 @@
    {
       return createdCounter_.get();
    }
+   
+   /**
+    * {@inheritDoc}
+    */
+   public void setAlgorithm(String algorithm)
+   {
+      sessionIDGenerator_.setAlgorithm(algorithm);
+   }
+   
+   /**
+    * {@inheritDoc}
+    */
+   public String getEntropy()
+   {
+      return sessionIDGenerator_.getEntropy();
+   }
+   
+   /**
+    * {@inheritDoc}
+    */
+   public void setEntropy(String entropy)
+   {
+      sessionIDGenerator_.setEntropy(entropy);
+   }
+   
+   /** 
+    * Only for compatibility with the Tomcat StandardManager mbean interface
+    * 
+    * @return null
+    */
+   public String getPathName()
+   {
+      return null;
+   }
+   
+   /** 
+    * No-op; only for compatibility with the Tomcat StandardManager mbean interface
+    * 
+    * @param pathname ignored
+    */
+   public void setPathname(String pathname)
+   {
+      if (pathname != null && pathname.length() > 0)
+      {
+         log_.debug(getClass().getSimpleName() + " is ignoring the pathname attribute");
+      }
+   }
 
+   
+   public String getRandomClass()
+   {
+      return sessionIDGenerator_.getRandomClass();
+   }
+   
+   public void setRandomClass(String randomClass)
+   {
+      sessionIDGenerator_.setRandomClass(randomClass);
+   }
+   
    /**
     * {@inheritDoc}
     */
+   public String getRandomFile()
+   {
+      return sessionIDGenerator_.getRandomFile();
+   }
+   
+   /**
+    * {@inheritDoc}
+    */
+   public void setRandomFile(String randomFile)
+   {
+      sessionIDGenerator_.setRandomFile(randomFile);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
    public long getExpiredSessionCount()
    {
       return expiredCounter_.get();
@@ -959,41 +1048,7 @@
    {
       return objectName_;
    }
-
-   // ------------------------------------------ Tomcat StandardManager Setters
    
-   // Following are setters exposed by Tomcat's StandardManager. We also
-   // expose them so if someone uses them in the default conf/context.xml
-   // we won't blow up during initialization
-   
-   public void setPathname(String pathname)
-   {
-      if (pathname != null && pathname.length() > 0)
-      {
-         log_.debug(getClass().getSimpleName() + " is ignoring the pathname attribute");
-      }
-   }
-   
-   public void setAlgorithm(String algorithm)
-   {
-      sessionIDGenerator_.setAlgorithm(algorithm);
-   }
-   
-   public void setEntropy(String entropy)
-   {
-      sessionIDGenerator_.setEntropy(entropy);
-   }
-   
-   public void setRandomClass(String randomClass)
-   {
-      sessionIDGenerator_.setRandomClass(randomClass);
-   }
-   
-   public void setRandomFile(String randomFile)
-   {
-      sessionIDGenerator_.setRandomFile(randomFile);
-   }
-
    // ------------------------------------------------------------------ Protected
 
    /**
@@ -1143,8 +1198,19 @@
             log_.warn("MBean " + clusterName + " already registered");
             return;
          }
-
-         server.registerMBean(this, clusterName);
+         
+         try
+         {
+            Registry.getRegistry(null, null).registerComponent(this, clusterName, null );
+         }
+         catch (Exception e)
+         {
+            Log.debug("Unable to register " + getName() + " with JBoss Web " + 
+                  Registry.class.getSimpleName() + " -- perhaps this class is " +
+                  		"not listed in an mbean-descriptors.xml? Falling back " +
+                  		"on direct registration with the MBeanServer");
+            server.registerMBean(this, clusterName);
+         }
          objectName_ = clusterName;
       }
       catch (Exception ex)
@@ -1170,11 +1236,20 @@
       {
          try
          {
-            mserver_.unregisterMBean(objectName_);
+            Registry.getRegistry(null, null).unregisterComponent(objectName_);
          }
          catch (Exception e)
          {
-            log_.error("Could not unregister " + getClass().getSimpleName() + " from MBeanServer", e);
+            // Assume this class is not in an mbean-descriptors.xml and that in
+            // registerManagerMBean we fell back on direct registration
+            try
+            {
+               mserver_.unregisterMBean(objectName_);
+            }
+            catch (Exception e1)
+            {
+               log_.error("Could not unregister " + getClass().getSimpleName() + " from MBeanServer", e1);
+            }
          }
       }
    }

Modified: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManagerMBean.java
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManagerMBean.java	2010-06-12 16:20:34 UTC (rev 106010)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/JBossManagerMBean.java	2010-06-13 01:03:47 UTC (rev 106011)
@@ -138,12 +138,29 @@
    boolean getDistributable();
    
    /**
+    * Set the distributable flag for the sessions supported by this
+    * Manager.  If this flag is set, all user data objects added to
+    * sessions associated with this manager must implement Serializable.
+    *
+    * @param distributable the distributable flag
+    */
+   void setDistributable(boolean distributable);
+   
+   /**
     * Gets the cumulative number of milliseconds spent in the 
     * <code>Manager.backgroundProcess()</code> method.
     */
    long getProcessingTime();
    
    /**
+    * Sets the cumulative number of milliseconds spent in the 
+    * <code>Manager.backgroundProcess()</code> method.
+    * 
+    * @param processingTime the processing time
+    */
+   void setProcessingTime(long processingTime);
+   
+   /**
     * Outputs the replication statistics as an HTML table, with one row
     * per session.
     */
@@ -176,6 +193,38 @@
    String getAlgorithm();
    
    /**
+    * Sets the message digest algorithm to be used when generating
+    * session identifiers.
+    * 
+    * @param algorithm the message digest algorithm
+    */
+   void setAlgorithm(String algorithm);
+   
+   /**
+    * Gets the session id generation entropy increaser value
+    */
+   String getEntropy();
+   
+   /**
+    * Sets the session id generation entropy increaser value.
+    *
+    * @param entropy The new entropy increaser value
+    */
+   void setEntropy(String entropy);
+   
+   /**
+    * Gets the file source of random for the session id generator
+    */
+   String getRandomFile();
+
+   /**
+    * Sets the file source of random for the session id generator
+    * 
+    * @param randomFile the path of the file source of random
+    */
+   void setRandomFile(String randomFile);
+   
+   /**
     * Gets the fully qualified class name of the managed object
     */
    String getClassName();
@@ -214,17 +263,38 @@
    int getSessionCounter();
    
    /**
+    * Sets the total number of sessions created by this manager.
+    *
+    * @param sessionCounter the new created session count
+    */
+   void setSessionCounter(int sessionCounter);
+   
+   /**
     * Gets the maximum number of active sessions so far. 
     * Same as {@link #getMaxActiveSessionCount()}
     */
    int getMaxActive();
    
    /**
+    * Sets the maximum number of active sessions so far.
+    *
+    * @param maxActive the new maximum number of active sessions
+    */
+   void setMaxActive(int maxActive);
+   
+   /**
     * Gets the longest time an expired session had been alive
     */
    int getSessionMaxAliveTime();
    
    /**
+    * Sets the longest time an expired session had been alive
+    * 
+    * @param sessionAliveTime the new longest session life
+    */
+   void setSessionMaxAliveTime(int sessionAliveTime);
+   
+   /**
     * Gets the average time an expired session had been alive
     */
    int getSessionAverageAliveTime();

Added: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/mbeans-descriptors.xml	                        (rev 0)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/mbeans-descriptors.xml	2010-06-13 01:03:47 UTC (rev 106011)
@@ -0,0 +1,326 @@
+<?xml version="1.0"?>
+<mbeans-descriptors>
+
+  <mbean         name="JBossCacheManager"
+          description="JBoss Cache based implementation of the Manager interface"
+               domain="Catalina"
+                group="Manager"
+                 type="org.jboss.web.tomcat.service.session.JBossCacheManager">
+
+    <attribute   name="activeSessionCount"
+          description="Number of active sessions at this moment, including
+                       replicated sessions that have not been accessed on this node"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="activeSessions"
+          description="Number of active sessions at this moment, including
+                       replicated sessions that have not been accessed on this node.
+                       Same as activeSessionCount"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="algorithm"
+          description="The message digest algorithm to be used when generating
+                       session identifiers"
+                 type="java.lang.String"/>
+
+    <attribute   name="className"
+          description="Fully qualified class name of the managed object"
+                 type="java.lang.String"
+            writeable="false"/>
+
+    <attribute   name="createdSessionCount"
+          description="Number of sessions created on this node. Does not include
+                       sessions initially created on other nodes, even if those 
+                       sessions were accessed on this node"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="distributable"
+          description="The distributable flag for Sessions created by this
+                       Manager"
+                 type="boolean"/>
+
+    <attribute   name="expiredSessionCount"
+          description="Number of sessions that expired (doesn't include explicit invalidations)"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="expiredSessions"
+          description="Number of sessions that expired (doesn't include explicit invalidations).
+                       Same as expiredSessionCount"
+                 type="int" />
+
+    <attribute   name="localActiveSessionCount"
+          description="Number of active sessions at this moment.  This does not
+                       include replicated sessions that have not been accessed 
+                       on this node"
+                 type="long"  
+            writeable="false"/>
+
+    <attribute   name="maxActive"
+          description="Maximum number of active sessions so far, including
+                       replicated sessions that have not been accessed on this 
+                       node. Same as maxActiveSessionCount"
+                 type="int" />
+
+    <attribute   name="maxActiveAllowed"
+          description="The maximum number of active Sessions allowed, or -1
+                       for no limit"
+                 type="int"/>
+
+    <attribute   name="maxActiveSessionCount"
+          description="Maximum number of active sessions so far, including
+                       replicated sessions that have not been accessed on this node"
+                 type="int"  
+            writeable="false"/>
+
+    <attribute   name="maxActiveSessions"
+          description="The maximum number of active Sessions allowed, or -1
+                       for no limit. Same as maxActiveAllowed"
+                 type="int"/>
+
+    <attribute   name="maxInactiveInterval"
+          description="The default maximum inactive interval for Sessions
+                       created by this Manager"
+                 type="int"/>
+
+    <attribute   name="maxLocalActiveSessionCount"
+          description="Maximum number of active sessions so far, excluding
+                       replicated sessions that have not been accessed on this node"
+                 type="int"  
+            writeable="false"/>
+
+    <attribute   name="name"
+          description="The descriptive name of this Manager implementation
+                       (for logging)"
+                 type="java.lang.String"
+            writeable="false"/>
+
+    <attribute name="processExpiresFrequency"
+               description="The frequency of the manager checks (expiration and passivation)"
+               type="int"/>
+
+    <attribute   name="processingTime"
+          description="Time spent doing housekeeping and expiration"
+                 type="long" />
+
+    <attribute   name="rejectedSessionCount"
+          description="Number of sessions we rejected due to maxActive being reached"
+                 type="int"
+            writeable="false"/>
+
+    <attribute   name="rejectedSessions"
+          description="Number of sessions we rejected due to maxActive being 
+                       reached. Same as rejectedSessionCount"
+                 type="int" />
+
+    <attribute   name="replicationStatistics"
+          description="The replication statistics for the sessions managed by this manager"
+                 type="org.jboss.web.tomcat.statistics.ReplicationStatistics"
+            writeable="false"/>
+
+    <attribute   name="sessionAverageAliveTime"
+          description="Average time an expired session had been alive"
+                 type="int" />
+
+    <attribute   name="sessionCounter"
+          description="Total number of sessions created by this manager. 
+                       Same as createdSessionCount"
+                 type="int" />
+
+    <attribute   name="sessionIdLength"
+          description="Number of characters used in creating a session id, 
+                       excluding any jvmRoute"
+                 type="int"
+            writeable="false"/>
+
+    <attribute   name="sessionMaxAliveTime"
+          description="Longest time an expired session had been alive"
+                 type="int" />
+
+    <attribute   name="timeSinceLastReset"
+          description="Elapsed time (in seconds) since this manager was instantiated 
+                       or the last call to resetStats()"
+                 type="long" 
+            writeable="false"/>
+
+
+    <attribute   name="randomFile"
+          description="File source of random - /dev/urandom or a pipe"
+                 type="java.lang.String"/>
+
+    <attribute   name="entropy"
+          description="A String initialization parameter used to increase the
+                       entropy of the initialization of our random number
+                       generator"
+                 type="java.lang.String"/>
+
+    <attribute   name="pathname"
+          description="Unused; exists solely for compatibility with the Tomcat manager mbean interface"
+                 type="java.lang.String"/>
+
+    <attribute   name="cacheConfigName"
+          description="Cache config name used to get the underlying cache from a cache manager"
+                 type="java.lang.String"
+            writeable="false"/>
+
+    <attribute   name="duplicates"
+          description="Number of duplicated session ids generated"
+                 type="int" />
+
+    <attribute   name="maxPassivatedSessionCount"
+          description="Maximum number of passivated sessions so far"
+                 type="long"  
+            writeable="false"/>
+
+    <attribute   name="maxUnreplicatedInterval"
+          description="Maximum interval between requests, in seconds, after which a
+                       request will trigger replication of the session's metadata 
+                       regardless of whether the request has otherwise made the session dirty"
+                 type="long"/>
+
+    <attribute   name="passivatedSessionCount"
+          description="Number of passivated sessions at this moment"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="passivationMaxIdleTime"
+          description="Elapsed time after which an inactive session will be passivated 
+                       to persistent storage if passivation is enabled"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="passivationMinIdleTime"
+          description="Elapsed time after which an inactive session will be passivated 
+                       to persistent storage if passivation is enabled and the 
+                       manager needs to passivate sessions early in order to
+                       comply with a maxActiveAllowed setting"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="replicationGranularity"
+          description="The granularity of what is replicated if session data is
+                       considered to be dirty"
+                 type="org.jboss.metadata.web.jboss.ReplicationGranularity" 
+            writeable="false"/>
+
+    <attribute   name="replicationTrigger"
+          description="The granularity of what is replicated if session data is
+                       considered to be dirty"
+                 type="org.jboss.metadata.web.jboss.ReplicationTrigger" 
+            writeable="false"/>
+
+    <attribute   name="snapshotInterval"
+          description="Number of milliseconds between replications if 'interval'
+                       snapshot mode is used"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="snapshotMode"
+          description="Whether replication should occur on request exit by the
+                       request thread ('instant' mode) or whether replication
+                       should be managed by a separate task that executes on
+                       a fixed interval ('interval' mode)"
+                 type="org.jboss.metadata.web.jboss.SnapshotMode" 
+            writeable="false"/>
+
+    <attribute   name="useJK"
+          description="Whether JK is being used and special handling of a jvmRoute
+                       portion of session ids is needed"
+                 type="java.lang.Boolean"
+            writeable="false"/>
+
+    <attribute   name="passivationEnabled"
+          description="Whether passivation was enabled in jboss-web.xml and in the
+                       underlying cache"
+                 type="boolean"
+            writeable="false"/>
+
+    <operation   name="reportReplicationStatistics"
+          description="Outputs the replication statistics as an HTML table, with one row
+                       per session"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+    <operation   name="reportReplicationStatisticsCSV"
+          description="Outputs the replication statistics as a set of comma-separated-values, 
+                       with one row per session, and the first row as a header listing field names"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+    <operation   name="reportReplicationStatisticsCSV"
+          description="Outputs the replication statistics for the given session 
+                       as a set of comma-separated-values, with a header row listing field names"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="resetStats"
+          description="Resets all statistics"
+               impact="ACTION"
+           returnType="void">
+    </operation>
+
+    <operation   name="expireSession"
+          description="Expire a session"
+               impact="ACTION"
+           returnType="void">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="getCreationTime"
+          description="Get the creation time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="getLastAccessedTime"
+          description="Get the last access time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="getSessionAttribute"
+          description="Return a session attribute"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+      <parameter name="key"
+          description="key of the attribute"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="listLocalSessionIds"
+          description="Return the list of active session ids, excluding
+                       replicated sessions that have not been accessed on this node"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+    <operation   name="listSessionIds"
+          description="Return the list of active session ids, including
+                       replicated sessions that have not been accessed on this node"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+  </mbean>
+
+</mbeans-descriptors>

Added: trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/persistent/mbeans-descriptors.xml
===================================================================
--- trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/persistent/mbeans-descriptors.xml	                        (rev 0)
+++ trunk/tomcat/src/main/java/org/jboss/web/tomcat/service/session/persistent/mbeans-descriptors.xml	2010-06-13 01:03:47 UTC (rev 106011)
@@ -0,0 +1,327 @@
+<?xml version="1.0"?>
+<mbeans-descriptors>
+
+  <mbean         name="DataSourcePersistentManager"
+          description="Manager interface implementation that replicates sessions
+                       by writing them to a shared persistent store"
+               domain="Catalina"
+                group="Manager"
+                 type="org.jboss.web.tomcat.service.session.persistent.DataSourcePersistentManager">
+
+    <attribute   name="activeSessionCount"
+          description="Number of active sessions at this moment, including
+                       replicated sessions that have not been accessed on this node"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="activeSessions"
+          description="Number of active sessions at this moment, including
+                       replicated sessions that have not been accessed on this node.
+                       Same as activeSessionCount"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="algorithm"
+          description="The message digest algorithm to be used when generating
+                       session identifiers"
+                 type="java.lang.String"/>
+
+    <attribute   name="className"
+          description="Fully qualified class name of the managed object"
+                 type="java.lang.String"
+            writeable="false"/>
+
+    <attribute   name="createdSessionCount"
+          description="Number of sessions created on this node. Does not include
+                       sessions initially created on other nodes, even if those 
+                       sessions were accessed on this node"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="distributable"
+          description="The distributable flag for Sessions created by this
+                       Manager"
+                 type="boolean"/>
+
+    <attribute   name="expiredSessionCount"
+          description="Number of sessions that expired (doesn't include explicit invalidations)"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="expiredSessions"
+          description="Number of sessions that expired (doesn't include explicit invalidations).
+                       Same as expiredSessionCount"
+                 type="int" />
+
+    <attribute   name="localActiveSessionCount"
+          description="Number of active sessions at this moment.  This does not
+                       include replicated sessions that have not been accessed 
+                       on this node"
+                 type="long"  
+            writeable="false"/>
+
+    <attribute   name="maxActive"
+          description="Maximum number of active sessions so far, including
+                       replicated sessions that have not been accessed on this 
+                       node. Same as maxActiveSessionCount"
+                 type="int" />
+
+    <attribute   name="maxActiveAllowed"
+          description="The maximum number of active Sessions allowed, or -1
+                       for no limit"
+                 type="int"/>
+
+    <attribute   name="maxActiveSessionCount"
+          description="Maximum number of active sessions so far, including
+                       replicated sessions that have not been accessed on this node"
+                 type="int"  
+            writeable="false"/>
+
+    <attribute   name="maxActiveSessions"
+          description="The maximum number of active Sessions allowed, or -1
+                       for no limit. Same as maxActiveAllowed"
+                 type="int"/>
+
+    <attribute   name="maxInactiveInterval"
+          description="The default maximum inactive interval for Sessions
+                       created by this Manager"
+                 type="int"/>
+
+    <attribute   name="maxLocalActiveSessionCount"
+          description="Maximum number of active sessions so far, excluding
+                       replicated sessions that have not been accessed on this node"
+                 type="int"  
+            writeable="false"/>
+
+    <attribute   name="name"
+          description="The descriptive name of this Manager implementation
+                       (for logging)"
+                 type="java.lang.String"
+            writeable="false"/>
+
+    <attribute   name="processExpiresFrequency"
+          description="The frequency of the manager checks (expiration and passivation)"
+                 type="int"/>
+
+    <attribute   name="processingTime"
+          description="Time spent doing housekeeping and expiration"
+                 type="long" />
+
+    <attribute   name="rejectedSessionCount"
+          description="Number of sessions we rejected due to maxActive being reached"
+                 type="int"
+            writeable="false"/>
+
+    <attribute   name="rejectedSessions"
+          description="Number of sessions we rejected due to maxActive being 
+                       reached. Same as rejectedSessionCount"
+                 type="int" />
+
+    <attribute   name="replicationStatistics"
+          description="The replication statistics for the sessions managed by this manager"
+                 type="org.jboss.web.tomcat.statistics.ReplicationStatistics"
+            writeable="false"/>
+
+    <attribute   name="sessionAverageAliveTime"
+          description="Average time an expired session had been alive"
+                 type="int" />
+
+    <attribute   name="sessionCounter"
+          description="Total number of sessions created by this manager. 
+                       Same as createdSessionCount"
+                 type="int" />
+
+    <attribute   name="sessionIdLength"
+          description="Number of characters used in creating a session id, 
+                       excluding any jvmRoute"
+                 type="int"
+            writeable="false"/>
+
+    <attribute   name="sessionMaxAliveTime"
+          description="Longest time an expired session had been alive"
+                 type="int" />
+
+    <attribute   name="timeSinceLastReset"
+          description="Elapsed time (in seconds) since this manager was instantiated 
+                       or the last call to resetStats()"
+                 type="long" 
+            writeable="false"/>
+
+
+    <attribute   name="randomFile"
+          description="File source of random - /dev/urandom or a pipe"
+                 type="java.lang.String"/>
+
+    <attribute   name="entropy"
+          description="A String initialization parameter used to increase the
+                       entropy of the initialization of our random number
+                       generator"
+                 type="java.lang.String"/>
+
+    <attribute   name="pathname"
+          description="Unused; exists solely for compatibility with the Tomcat manager mbean interface"
+                 type="java.lang.String"/>
+
+    <attribute   name="duplicates"
+          description="Number of duplicated session ids generated"
+                 type="int" />
+
+    <attribute   name="maxPassivatedSessionCount"
+          description="Maximum number of passivated sessions so far"
+                 type="long"  
+            writeable="false"/>
+
+    <attribute   name="maxUnreplicatedInterval"
+          description="Maximum interval between requests, in seconds, after which a
+                       request will trigger replication of the session's metadata 
+                       regardless of whether the request has otherwise made the session dirty"
+                 type="long"/>
+
+    <attribute   name="passivatedSessionCount"
+          description="Number of passivated sessions at this moment"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="passivationMaxIdleTime"
+          description="Elapsed time after which an inactive session will be passivated 
+                       to persistent storage if passivation is enabled"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="passivationMinIdleTime"
+          description="Elapsed time after which an inactive session will be passivated 
+                       to persistent storage if passivation is enabled and the 
+                       manager needs to passivate sessions early in order to
+                       comply with a maxActiveAllowed setting"
+                 type="long" 
+            writeable="false"/>
+
+    <attribute   name="replicationTrigger"
+          description="The granularity of what is replicated if session data is
+                       considered to be dirty"
+                 type="org.jboss.metadata.web.jboss.ReplicationTrigger" 
+            writeable="false"/>
+
+    <attribute   name="snapshotInterval"
+          description="Number of milliseconds between replications if 'interval'
+                       snapshot mode is used"
+                 type="int" 
+            writeable="false"/>
+
+    <attribute   name="snapshotMode"
+          description="Whether replication should occur on request exit by the
+                       request thread ('instant' mode) or whether replication
+                       should be managed by a separate task that executes on
+                       a fixed interval ('interval' mode)"
+                 type="org.jboss.metadata.web.jboss.SnapshotMode" 
+            writeable="false"/>
+
+    <attribute   name="useJK"
+          description="Whether JK is being used and special handling of a jvmRoute
+                       portion of session ids is needed"
+                 type="java.lang.Boolean"
+            writeable="false"/>
+
+    <attribute   name="passivationEnabled"
+          description="Whether passivation was enabled in jboss-web.xml and in the
+                       underlying cache"
+                 type="boolean"
+            writeable="false"/>
+
+    <attribute   name="dataSourceJndiName"
+          description="JNDI name under which the DataSource this manager uses is bound"
+                 type="java.lang.String"
+            writeable="false"/>
+
+    <attribute   name="cleanupInterval"
+          description="Minimum interval, in seconds, between attempts by this manager
+                       to remove expired sessions from the database"
+                 type="java.lang.Integer"
+            writeable="false"/>
+
+    <operation   name="reportReplicationStatistics"
+          description="Outputs the replication statistics as an HTML table, with one row
+                       per session"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+    <operation   name="reportReplicationStatisticsCSV"
+          description="Outputs the replication statistics as a set of comma-separated-values, 
+                       with one row per session, and the first row as a header listing field names"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+    <operation   name="reportReplicationStatisticsCSV"
+          description="Outputs the replication statistics for the given session 
+                       as a set of comma-separated-values, with a header row listing field names"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="resetStats"
+          description="Resets all statistics"
+               impact="ACTION"
+           returnType="void">
+    </operation>
+
+    <operation   name="expireSession"
+          description="Expire a session"
+               impact="ACTION"
+           returnType="void">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="getCreationTime"
+          description="Get the creation time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="getLastAccessedTime"
+          description="Get the last access time"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="getSessionAttribute"
+          description="Return a session attribute"
+               impact="ACTION"
+           returnType="java.lang.String">
+      <parameter name="sessionId"
+          description="Id of the session"
+                 type="java.lang.String"/>
+      <parameter name="key"
+          description="key of the attribute"
+                 type="java.lang.String"/>
+    </operation>
+
+    <operation   name="listLocalSessionIds"
+          description="Return the list of active session ids, excluding
+                       replicated sessions that have not been accessed on this node"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+    <operation   name="listSessionIds"
+          description="Return the list of active session ids, including
+                       replicated sessions that have not been accessed on this node"
+               impact="ACTION"
+           returnType="java.lang.String">
+    </operation>
+
+  </mbean>
+
+</mbeans-descriptors>



More information about the jboss-cvs-commits mailing list