We use a combination of a filter and a HttpSessionListener to achieve something like this (we do not store the list of currently stored users in a db). The filter checks whether the current user is logged in and if yes, adds the user id to a application context hashtable. The same hashtable is used by the same filter to prevent multiple simultaneous logins on the same userid. The timeout, in case of browser crash/hang/close, is handled via Session.setMaxInactiveInterval() along with the sessionDestroyed event handler in the HttpSessionListener .
Cheers, Krishna -----Original Message----- From: Meyer-Willner, Bernhard [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 7:14 PM To: JBoss-User (E-Mail) Subject: [JBoss-user] List of active users logged in thru JAAS Hi, I'm using JAAS to authenticate users logging in against a database. I was wondering if there is any way to find out if a user's LoginContext has timed out (is active respectively). Thing is, for business logic reasons, we also have to keep information about all logged in users in a database table. If for some reason the client app hangs or the user doesn't log out properly these user record sets remain in the database. We're planning on running a scheduler MBean service that removes recordsets above a certain age from time to time. However, to be sure that the user isn't actively using our app/system any more we would like to check, if he's still authenticated in JBoss. Is there any way to find this out and get a list of active/logged on users, authenticated thru JAAS? Thanks for any ideas. Bernie This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user