This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Assuming this is a web app, look into the HttpSessionListener. There are a couple ways to get an implementing class hooked up to the events. If you're in a cluster this will only monitor the one clone it's running on and a user could possibly show up in two places at once.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi