
Have you ever asked yourself how many users are using your favorite service at the moment? Watching the leaves falling down outside your window you ask yourself - am I alone? Is there anyone logged in except me? Hey! Stop watching the leaves, they will only make you more melancholic ;) - use the JMX :)
Read this article, and you'll discover the idea of controlling number of users logged in for web application based on Spring Framework, Spring Security and Java Management Extensions (JMX).