description="Id of the session"
type="java.lang.String"/>
</operation>
+ <operation name="getLastAccessedTimestamp"
+ description="Get the last access timestamp"
+ impact="ACTION"
+ returnType="long">
+ <parameter name="sessionId"
+ description="Id of the session"
+ type="java.lang.String"/>
+ </operation>
+ <operation name="getCreationTimestamp"
+ description="Get the creation timestamp"
+ impact="ACTION"
+ returnType="long">
+ <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"
s.expire();
}
-
+ public long getLastAccessedTimestamp( String sessionId ) {
+ Session s=(Session)sessions.get(sessionId);
+ if(s== null)
+ return -1 ;
+ return s.getLastAccessedTime();
+ }
+
public String getLastAccessedTime( String sessionId ) {
Session s=(Session)sessions.get(sessionId);
if( s==null ) {
return new Date(s.getCreationTime()).toString();
}
+ public long getCreationTimestamp( String sessionId ) {
+ Session s=(Session)sessions.get(sessionId);
+ if(s== null)
+ return -1 ;
+ return s.getCreationTime();
+ }
+
// -------------------- JMX and Registration --------------------
protected String domain;
protected ObjectName oname;
type="java.lang.String"/>
</operation>
+ <operation name="getLastAccessedTimestamp"
+ description="Get the last access timestamp"
+ impact="ACTION"
+ returnType="long">
+ <parameter name="sessionId"
+ description="Id of the session"
+ type="java.lang.String"/>
+ </operation>
+
+ <operation name="getCreationTimestamp"
+ description="Get the creation timestamp"
+ impact="ACTION"
+ returnType="long">
+ <parameter name="sessionId"
+ description="Id of the session"
+ type="java.lang.String"/>
+ </operation>
+
</mbean>
<mbean name="PersistentManager"
type="java.lang.String"/>
</operation>
+ <operation name="getLastAccessedTimestamp"
+ description="Get the last access timestamp"
+ impact="ACTION"
+ returnType="long">
+ <parameter name="sessionId"
+ description="Id of the session"
+ type="java.lang.String"/>
+ </operation>
+
+ <operation name="getCreationTimestamp"
+ description="Get the creation timestamp"
+ impact="ACTION"
+ returnType="long">
+ <parameter name="sessionId"
+ description="Id of the session"
+ type="java.lang.String"/>
+ </operation>
+
</mbean>
</mbeans-descriptors>
</subsection>
<subsection name="Catalina">
<changelog>
+ <add>
+ Add ManagerBase session getLastAccessedTimestamp and getCreationTimestamp for better
+ remote JMX access. (pero)
+ </add>
<fix>
Set correct StandardManager.sessionCounter after reload/restart. (pero)
</fix>