This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See In database I'll have:

user1 session1 object1

if the user log out, I remove the line from database. However, he can also close the navigator. So to unlock the object, I need to check (after a session timeout), that the session is nolonger active, and I delete it.

To do that I need to get the list of active sessions from the server. However I can't find any non deprecated method to do it.

Does anyone have an idea about this.
Thank you.

Posts: 14691
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Registering a HttpSessionListener in your deployment descriptor ?
Posts: 6663
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not use a SessionBindingListener ? Your object can be notified when the user logs out or when the session times out. I think what you should be looking for is a transaction, so that no one else can touch the table that the user is working on.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!