Wildfly does not update MBean session attributes (JMX)

212 views Asked by At

I am accessing WildFly (22) via JMX to access one of its MBeans. It is the session information of an web application. This is generally working however I can only see one attribute changing over time which is the activeSessions attribute. All other attributes like expiredSessions, highestSessionCount, maxActiveSessions, rejectedSessions, sessionsCreated etc always remain 0.

Does anybody know the reason for this? Is some special activation for those values necessary?

1

There are 1 answers

0
Lonzak On

Ok I found it. In order to gather statistics about HTTP sessions, you need to enable statistics on undertow subsystem. One possibility is to use the CLI as follows:

/subsystem=undertow:write-attribute(name=statistics-enabled,value=true)

or directly in the standalone.xml:

<subsystem xmlns="urn:jboss:domain:undertow:XX.0" default-server="default-server"  statistics-enabled="true">