0

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?

Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49

1 Answers1

1

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)

ehsavoie
  • 3,126
  • 1
  • 16
  • 14
  • Thanks Emmanuel but it's already what I do in JMX (I edited my question to clarify) to get the number of active sessions. Still I can't find anything equivalent to listSessionIds in WF8. – Gaël Marziou Oct 07 '14 at 08:17
  • The SessionManager in Undertow has the information you are looking for. I don't think these informations are currently made available in WildFly. Take a look at org.wildfly.extension.undertow.DeploymentInfo.SessionManagerStatsHandler which accesses it and where it could be implemented. – ehsavoie Oct 22 '14 at 09:19