hi I am using Spring security 2.0.5 in my current project. Can anybody please suggest me on how to get the count of currently logged in users to application. I found a solution in forums for Security 3.0 using ConcurrentSessionControlStrategy but since it is not in 2.0.5, and it is not feasible for me to currently advance to 3.0 It is mentioned in a post in 'stack Overflow' to use ConcurrentSessionControllerImpl for the same.Bu开发者_StackOverflowt I couldn't get the actual implementation of the same.
Thanks in Advance, Mayank
Simply declare a bean of class SessionRegistryImpl and inject it in your bean and use its getAllPrincipals method.
精彩评论