You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Angus Mezick <am...@guidestar.org> on 2003/07/08 15:28:30 UTC

[PATCH] Use correct method to get number of active sessions.

The question is: Why turn a hashmap into an array just to take its
length when you already have a method that returns the number of
sessions?  This will make the life of people who write session managers
that DON'T store all the active sessions in memory easier.


--- HTMLManagerServlet.java     2003-03-19 04:18:34.000000000 -0500
+++ HTMLManagerServlet.java     2003-07-08 09:22:04.000000000 -0400
@@ -403,7 +403,7 @@
                     (request.getContextPath() +
                      "/html/sessions?path=" + displayPath);
                 args[4] =
-                    new
Integer(context.getManager().findSessions().length);
+                    new
Integer(context.getManager().getActiveSessions());
                 writer.print
                     (MessageFormat.format(APPS_ROW_DETAILS_SECTION,
args));

Angus Mezick
GuideStar - Philanthropic Research Inc.
427 Scotland St.
Williamsburg, Virginia 23185
PHONE: (757)299-4631 x35  FAX:(757)229-8912
amezick@guidestar.org <ma...@guidestar.org>
www.guidestar.org <http://www.guidestar.org>

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