This content has been marked as final.
Show 1 reply
-
1. Re: get the number of current sessions & conversations?
monkeyden Feb 4, 2011 11:21 AM (in response to jeanluc)There is already a session listener SeamListener. I would simply extend that one, and change web.xml to register your version. Then, I might have an application-scoped counter to keep track, adding in sessionCreated() and subtracting in sessionDestroyed(). I haven't tried it but, in theory, it would work.
For conversations, most are so short lived that it likely wouldn't tell you much. What you really want, I suspect, is the number of long-running conversations (LRCs). That would take some thinking as, to my knowledge, Seam doesn't maintain a list of LRCs. You might want to look at @Interceptors. Look at some of the work done in org.jboss.seam.core.ConversationInterceptor for guidance.