Author: markt
Date: Tue Nov 30 10:02:33 2010
New Revision: 1040453

URL: http://svn.apache.org/viewvc?rev=1040453&view=rev
Log:
randomClass -> secureRandomClass
Align (and tidy up) mbean descriptor

Modified:
    tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
    tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml

Modified: tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=1040453&r1=1040452&r2=1040453&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/ManagerBase.java Tue Nov 30 
10:02:33 2010
@@ -140,7 +140,7 @@ public abstract class ManagerBase extend
      * used when generating session identifiers. The random number generator(s)
      * will always be seeded from a SecureRandom instance.
      */
-    protected String randomClass = "java.security.SecureRandom";
+    protected String secureRandomClass = "java.security.SecureRandom";
 
 
     /**
@@ -515,12 +515,12 @@ public abstract class ManagerBase extend
         long t1 = System.currentTimeMillis();
         try {
             // Construct and seed a new random number generator
-            Class<?> clazz = Class.forName(randomClass);
+            Class<?> clazz = Class.forName(secureRandomClass);
             result = (SecureRandom) clazz.newInstance();
         } catch (Exception e) {
             // Fall back to the default case
             log.error(sm.getString("managerBase.random",
-                    randomClass), e);
+                    secureRandomClass), e);
             result = new java.security.SecureRandom();
         }
         byte[] seedBytes = randomSeed.generateSeed(64);
@@ -573,9 +573,9 @@ public abstract class ManagerBase extend
     /**
      * Return the random number generator class name.
      */
-    public String getRandomClass() {
+    public String getSecureRandomClass() {
 
-        return (this.randomClass);
+        return (this.secureRandomClass);
 
     }
 
@@ -585,12 +585,12 @@ public abstract class ManagerBase extend
      *
      * @param randomClass The new random number generator class name
      */
-    public void setRandomClass(String randomClass) {
+    public void setSecureRandomClass(String randomClass) {
 
-        String oldRandomClass = this.randomClass;
-        this.randomClass = randomClass;
+        String oldRandomClass = this.secureRandomClass;
+        this.secureRandomClass = randomClass;
         support.firePropertyChange("randomClass", oldRandomClass,
-                                   this.randomClass);
+                                   this.secureRandomClass);
 
     }
 

Modified: tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml?rev=1040453&r1=1040452&r2=1040453&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml 
(original)
+++ tomcat/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml Tue 
Nov 30 10:02:33 2010
@@ -75,14 +75,18 @@
           description="Path name of the disk file in which active sessions"
                  type="java.lang.String"/>
 
-    <attribute name="processExpiresFrequency"
-               description="The frequency of the manager checks (expiration 
and passivation)"
-               type="int"/>
+    <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="secureRandomClass"
+          description="The random number generator class name"
+                 type="java.lang.String"/>
+
     <attribute   name="sessionAverageAliveTime"
           description="Average time an expired session had been alive"
                  type="int"
@@ -113,7 +117,8 @@
                  
     <attribute   name="stateName"
           description="The name of the LifecycleState that this component is 
currently in"
-                 type="java.lang.String"/>
+                 type="java.lang.String"
+            writeable="false"/>
 
     <attribute   name="randomFile"
           description="File source of random - /dev/urandom or a pipe that 
will be used when the Manager is next started"
@@ -124,10 +129,6 @@
                  type="java.lang.String"
             writeable="false"/>
                  
-    <attribute   name="randomClass"
-          description="The random number generator class name"
-                 type="java.lang.String"/>
-
     <attribute   name="rejectedSessions"
           description="Number of sessions we rejected due to maxActive beeing 
reached"
                  type="int"
@@ -221,8 +222,7 @@
             writeable="false"/>
 
     <attribute   name="distributable"
-          description="The distributable flag for Sessions created by this
-                       Manager"
+          description="The distributable flag for Sessions created by this 
Manager"
                  type="boolean"/>
                  
     <attribute   name="duplicates"
@@ -261,8 +261,7 @@
                  type="int"/>
 
     <attribute   name="maxInactiveInterval"
-          description="The default maximum inactive interval for Sessions
-                       created by this Manager"
+          description="The default maximum inactive interval for Sessions 
created by this Manager"
                  type="int"/>
                  
     <attribute   name="minIdleSwap"
@@ -270,14 +269,13 @@
                  type="int"/>
 
     <attribute   name="name"
-          description="The descriptive name of this Manager implementation
-                       (for logging)"
+          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="processExpiresFrequency"
+          description="The frequency of the manager checks (expiration and 
passivation)"
+                 type="int"/>
 
     <attribute   name="processingTime"
           description="Time spent doing housekeeping and expiration"
@@ -287,6 +285,10 @@
           description="Indicates whether sessions are saved when the Manager 
is shut down properly. This requires the unload() method to be called."
                  type="boolean" />
                
+    <attribute   name="secureRandomClass"
+          description="The random number generator class name"
+                 type="java.lang.String"/>
+
     <attribute   name="sessionAverageAliveTime"
           description="Average time an expired session had been alive"
                  type="int"
@@ -318,16 +320,12 @@
     <attribute   name="stateName"
           description="The name of the LifecycleState that this component is 
currently in"
                  type="java.lang.String"
-                 writeable="false"/>
+            writeable="false"/>
 
     <attribute   name="randomFile"
           description="File source of random - /dev/urandom or a pipe"
                  type="java.lang.String"/>
                  
-    <attribute   name="randomClass"
-          description="The random number generator class name"
-                 type="java.lang.String"/>
-
     <attribute   name="rejectedSessions"
           description="Number of sessions we rejected due to maxActive beeing 
reached"
                  type="int"



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to