I think Yoav's point was that once you had your calculation (total time on site), you could update a database with the information when the session was over.


Yes, it still uses a DB, but only for long-term storage and querying, which is typically what DBs are for.

John

On Thu, 3 Jul 2003 17:25:01 +0100, Andoni <[EMAIL PROTECTED]> wrote:

That is fine for monitoring who or how many are online now but it is no use
for long-term statistics calculation. I want to be able to graph the
changes in times spent on the site over the past week / month / year. For
that I think I will need a DB approach??


Andoni.


----- Original Message ----- From: "Shapira, Yoav" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, July 03, 2003 4:15 PM Subject: RE: Storing the SessionID in the Database.



Howdy,
Why not to this via a session listener?  It's trivial.  Keep a static
map with the session Id (String, key) and creation time (long, value).
Add a value in the sessionCreated event and remove the value, calculate
delta in the sessionDestroyed event.  That's so much cleaner than a
DB-oriented approach.

Yoav Shapira
Millennium ChemInformatics


-----Original Message-----
From: Andoni [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 03, 2003 11:11 AM
To: Tomcat Users List
Subject: Re: Storing the SessionID in the Database.

Yes, the can.  In fact I am using JSP so I can do session.getID() at
anytime.

But this does not help me as I want to know how long this session has
been
active. I want to be able to store the timestamp for when the session
was
invalidated by clicking "exit" so as to be able to calculate how long
(on
average) users spend on my site.

Andoni.

----- Original Message -----
From: "Shapira, Yoav" <[EMAIL PROTECTED]>

When the user clicks, does it not go to some page in your system?
Can't
that page just do request.getSession() to get the session and its ID?


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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged. This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else. If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender. Thank you.



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



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





-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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



Reply via email to