pero 2005/04/10 12:29:09 Modified: modules/cluster/src/share/org/apache/catalina/cluster/session DeltaManager.java mbeans-descriptors.xml webapps/docs changelog.xml Log: DeltaManager has now JMX expireAllLocalSessions and processExipre operation for better cluster node shutdown handling Revision Changes Path 1.43 +32 -1 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java Index: DeltaManager.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/DeltaManager.java,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- DeltaManager.java 10 Apr 2005 16:20:46 -0000 1.42 +++ DeltaManager.java 10 Apr 2005 19:29:09 -0000 1.43 @@ -1033,6 +1033,37 @@ } /** + * Exipre all find sessions. + */ + public void expireAllLocalSessions() + { + long timeNow = System.currentTimeMillis(); + Session sessions[] = findSessions(); + int expireDirect = 0 ; + int expireIndirect = 0 ; + + if(log.isDebugEnabled()) + log.debug("Start expire all sessions " + getName() + " at " + timeNow + " sessioncount " + sessions.length); + for (int i = 0; i < sessions.length; i++) { + if (sessions[i] instanceof DeltaSession) { + DeltaSession session = (DeltaSession) sessions[i]; + if (session.isPrimarySession()) { + if (session.isValid()) { + session.expire(); + expireDirect++; + } else { + expireIndirect++; + } + } + } + } + long timeEnd = System.currentTimeMillis(); + if(log.isDebugEnabled()) + log.debug("End expire sessions " + getName() + " exipre processingTime " + (timeEnd - timeNow) + " expired direct sessions: " + expireDirect + " expired direct sessions: " + expireIndirect); + + } + + /** * When the manager expires session not tied to a request. The cluster will * periodically ask for a list of sessions that should expire and that * should be sent across the wire. 1.4 +12 -0 jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml Index: mbeans-descriptors.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/mbeans-descriptors.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mbeans-descriptors.xml 10 Apr 2005 16:20:46 -0000 1.3 +++ mbeans-descriptors.xml 10 Apr 2005 19:29:09 -0000 1.4 @@ -215,6 +215,18 @@ type="java.lang.String"/> </operation> + <operation name="expireAllLocalSessions" + description="Exipre all active local sessions and replicate the invalid sessions" + impact="ACTION" + returnType="void"> + </operation> + + <operation name="processExpires" + description="force process to expire sessions" + impact="ACTION" + returnType="void"> + </operation> + <operation name="resetStatistics" description="Reset all statistics" impact="ACTION" 1.286 +4 -0 jakarta-tomcat-catalina/webapps/docs/changelog.xml Index: changelog.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/changelog.xml,v retrieving revision 1.285 retrieving revision 1.286 diff -u -r1.285 -r1.286 --- changelog.xml 10 Apr 2005 16:27:13 -0000 1.285 +++ changelog.xml 10 Apr 2005 19:29:09 -0000 1.286 @@ -115,6 +115,10 @@ <subsection name="Cluster"> <changelog> <add> + DeltaManager has now JMX expireAllLocalSessions and processExipre operation + for better cluster node shutdown handling (pero) + </add> + <add> DataSender doWaitAckStats for better understanding wait ack problems (pero) </add> <update>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]