wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Session bean on timeout write to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Session bean on timeout write to database" Watch "Session bean on timeout write to database" New topic
Author

Session bean on timeout write to database

Michael ness
Greenhorn

Joined: Sep 09, 2002
Posts: 7
Hi,
I have a session bean which I use to store user login information. When this bean is created I also write information to a database such as a userid, what time they logged in etc.
Now when the session times out or the browser window is closed I'd like to be able to write to the database that this has happened. This way I can keep track of who is actively logged into the system.
Does anybody know if this is possible and how to do it.
Thanks
Dave Landers
Ranch Hand

Joined: Jul 24, 2002
Posts: 401
Add a HttpSessionBindingListener to the session, it'll get unbound notification when the session times out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session bean on timeout write to database
 
Similar Threads
Websphere not returning session-scoped bean
Using transaction with Websphere...
Maintaining an audit trail for all web pages visited in a Struts based application
Session Expiration and Beans
Targetting specific Objects in session