Originally posted by sundaramoorthi thangavel:
....
* Suppose network is down for a minute. At that time those two users close the application. When the net is up, again they are tring to access the application. In this scenario, no users will be allowed to access the application. Because the count in database is 2(Maximum users). We have to manually reset the counter in database otherwise it won't work.
If the app is down, they're not going to be able to invalidate their sessions.
They can close the browser but that won't invalidate the sessions.
This will be the case whether even if the app is not down.
Servlet apps have no, reliable, way of knowing that a user has closed their browser (or lost network connectivity, etc...)
No matter where you store the current session count, your going to have the problem of people taking seats that they are no longer using; until the unused session times out on the server.