Question

How can I get the number of active session counts at the Jboss AS 7.2 (all sessions, not at single war)? I looked deeply for a MXBean that could give me that information but I didn't find one. There are a lot of information about that, but just for older versions. This seens to be an easy thing to do, but it's been very difficult to find an answer.

JMX is not a must if I can get this programatically by another way. I just cant modify the older projects to add listeners to check for that.

Was it helpful?

Solution

Well, after some digging I found an way using JBoss CLI (just google a little about it and the special syntax called Detyped Management Model). With that in mind just call this command at the CLI:

/deployment=<YOUR-EAR-NAME>.ear/subdeployment=<YOUR-WAR-NAME>.war/subsystem=\"web\"/:read-attribute(name=active-sessions)

With that you can know the connected users for that specific war. This can be tunned with different ways to look for all wars, so just play with it. There's an API to do that programatically too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top