The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Session Registry?

Posted by Oliver Chua on July 11, 2000 at 2:14 AM

We are trying to mimic the session in Servlets by saving to a database with the sessionId as part of the primary key. The problem is, when the session expires, the API has no way of notifying us that is has happended so that entries in the database can be cleaned.

The only thing I can think of is making a SessionRegistry that will be polled from time to time to check if the session is invalidated. However, everytime the session is accessed, the timeout is reset. Furthermore, during debugging, the developer would normally use Ctrl-C to stop the servletrunner, so database entries are never erased.

Does anybody have an idea how to accomplish this?

  • Session mohammed November 01, 2001 at 1:23 AM (0)

Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us