You could use a SessionListener (Servlet 2.3) and set a flag in memory when a Session is created and uncheck the flag when the Session is destoryed. Before creating a new Session check your flag to see if anyone else is using the application. This will ensure at most one user.
Make sure that the check and set of your flag is in a single synchronized method to remove threading issues.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.