tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r573964 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/ha/session/mbeans-descriptors.xml java/org/apache/catalina/session/ManagerBase.java java/org/apache/catalina/session/mbeans-descriptors.xml webapps/docs/changelog.xml
Date Sun, 09 Sep 2007 09:04:28 GMT
Author: pero
Date: Sun Sep  9 02:04:27 2007
New Revision: 573964

URL: http://svn.apache.org/viewvc?rev=573964&view=rev
Log:
Made session createTime accessible for all SessionManager via JMX - Backport from 5.5.x

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml?rev=573964&r1=573963&r2=573964&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml Sun Sep
 9 02:04:27 2007
@@ -334,6 +334,14 @@
         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="expireAllLocalSessions"
       description="Exipre all active local sessions and replicate the invalid sessions"
@@ -562,5 +570,14 @@
         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>
+    
   </mbean>
 </mbeans-descriptors>

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java?rev=573964&r1=573963&r2=573964&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java Sun Sep  9 02:04:27
2007
@@ -1207,12 +1207,22 @@
     public String getLastAccessedTime( String sessionId ) {
         Session s=(Session)sessions.get(sessionId);
         if( s==null ) {
-            log.info("Session not found " + sessionId);
+            if(log.isInfoEnabled())
+                log.info("Session not found " + sessionId);
             return "";
         }
         return new Date(s.getLastAccessedTime()).toString();
     }
 
+    public String getCreationTime( String sessionId ) {
+        Session s=(Session)sessions.get(sessionId);
+        if( s==null ) {
+            if(log.isInfoEnabled())
+                log.info("Session not found " + sessionId);
+            return "";
+        }
+        return new Date(s.getCreationTime()).toString();
+    }
 
     // -------------------- JMX and Registration  --------------------
     protected String domain;

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml?rev=573964&r1=573963&r2=573964&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/mbeans-descriptors.xml Sun Sep 
9 02:04:27 2007
@@ -151,6 +151,15 @@
                  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>
+
   </mbean>
 
   <mbean         name="PersistentManager"
@@ -296,6 +305,15 @@
 
     <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="getCreationTime"
+          description="Get the creation time"
                impact="ACTION"
            returnType="java.lang.String">
       <parameter name="sessionId"

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=573964&r1=573963&r2=573964&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Sep  9 02:04:27 2007
@@ -59,9 +59,12 @@
         Takayuki Kaneko. (markt)
       </fix>
       <fix>
-         <bug>43216</bug>: Set correct StandardSession#accessCount as StandardSession.ACTIVITY_CHECK
is true.
-          Patch provided by Takayuki Kaneko (pero)
+        <bug>43216</bug>: Set correct StandardSession#accessCount as StandardSession.ACTIVITY_CHECK
is true.
+        Patch provided by Takayuki Kaneko (pero)
       </fix>
+      <add>
+        Made session createTime accessible for all SessionManager via JMX (pero)
+      </add>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Mime
View raw message