File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes double login block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply locked New topic

double login block

Bruno Santos

Joined: Nov 11, 2004
Posts: 7
hi all,

Here is my problem:
I cant allow a user to login into the system twice from different machines.
I'm thinking in use a singleton that handles a HashMap with all user's login, so if the same user try to access from other machine the system will block him.
I wanna know how is the best way to put the user's login out from the HashMap, once the user will never click on "logout" button to exit. Is there a eventlistener to inform the singleton that the user's session has expired?

or, if anyone have a better way to do that, please tell me!


* Sorry about my poor english!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Romero, please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please continue any discussion of this topic here.


[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: double login block
It's not a secret anymore!