Gaël Marziou
Gaël Marziou

Reputation: 16284

How to view user sessions in WildFly 8.1 using JMX?

In JBoss 5.1, we used JMX to monitor the number of active sessions and few other statistics per session (last accessed time, ...) in our web application using jboss.web MBean activeSessions and listSessionIds to iterate over sessions and call getLastAccessedTime method.

In WildFly 8.1, I found activeSessions attribute of jboss.as.expr:deployment=tcl.war,subsystem=undertow that returns the number of active sessions but I could not find a way to retrieve the list of session Ids, it seems this was provided by Tomcat in Boss 5.1 and maybe Undertow does not provide an equivalence.

Did I miss something?

Upvotes: 0

Views: 4276

Answers (1)

ehsavoie
ehsavoie

Reputation: 3527

You can access the active sessions using the CLI or the management API of WildFly : for example the current CLI operation will return the number of active sessions for the example-web.war :/deployment=example.ear/subdeployment=example-web.war/subsystem=undertow :read-attribute(name=active-sessions)

Upvotes: 1

Related Questions