On Thu, 27 Mar 2003, Balaji wrote:

> Date: Thu, 27 Mar 2003 11:07:40 +0530
> From: Balaji <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Architecture Details
>
> Hi,
> Can anyone tell me where to find the overall component architecture of
> Catalina ?
>

Note:  it is considered impolite to hijack someone else's message thread
to ask an unrelated question.  if you want to ask a new question, you
should really post a new message rather than replying to an existing one.

Your best starting point is to peruse the Catalina Javadocs that are in
the "tomcat-docs" webapp included with Tomcat -- also available online
(although not necessarily up to date for you particular version of
Tomcat):

  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/

For the question you posted on TOMCAT-DEV about how to get the current
number of active sessions (which is really more relevant here), neither
interceptors (Tomcat 3.3) or valves (Tomcat 4/5)  are the right way to
approach to figuring that out.  The reason for this is that interceptors
and valves are focused on what happens to each individual request -- and
sessions can be created and destroyed at times that are totally
independent of when a request comes in.

For any Servlet 2.3 or later container (including Tomcat 4.x or Tomcat
5.x) you should investigate using a javax.servlet.http.HttpSessionListener
to detect when new sessions are created, and existing sessions are
destroyed.  If you store the current count in some globally accessible
location, then you can use it however you like.  For a Servlet 2.2
container (such as Tomcat 3.3), HttpSessionListener did not exist, so you
will have to figure out how to hand-modify the container source code.
And, of course, you will be tying yourself to a particular version (3.3)
of a particular container (Tomcat) now and forever.  You should think
twice before making that sort of decision -- especially when you are
looking at tying yourself to a version of Tomcat that will soon (when
Tomcat 5 final is released) will be two major version numbers out of date.

> TIA
> Bala
>

Craig McClanahan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to