File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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