Ivo Limmen typed the following on 03:58 PM 1/30/2001 +0100
>I created an object that tracks the amount of sessions and can refer to any
>of them if needed be. It uses a weak reference to make it possible that
>Tomcat can still drop a session if a user leaves the server. The trouble is
>Tomcat doesn't drop any sessions! It can't be because I have a reference to
>the session because I use a weak reference to them.
>Does anybody know a sollution to be able to refer to a session object only
>if they are in use?

Tracking sessions is a bit tricky, because Tomcat (like other servlet engines)
pools session objects: after the user's session is done, the session object's
data is cleared and it is put on a list to be reused for later users. This helps
make Tomcat much faster than it used to be, but does make tracking sessions
tricky. Look into using the Listener interfaces in the Servlet 2.2 API (Tomcat 3.2)
or Servlet 2.3 API (Tomcat 4 - which is currently in development).

Kief


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

Reply via email to