This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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!