Martin Cassidy
Martin Cassidy

Reputation: 736

Unable to access datasource mbeans via jmx in wildfly swarm/thorntail

I'm trying to enable JMX for my wildfly swarm component. I'm used to seeing several mbeans for a variety of wildfly subsystems, I'm specifically interested in the data source mbeans.

I've pasted a snippet below, I've got the jmx fraction and I have statistics-enabled set to true. When thorntail is running I can connect to the JVM via JMX, but I am cannot see any datasource mbeans. Is there something else that needs to be enabled for them to show up?

The app is currently on swarm 2018.2.0.Final

swarm:
  jmx:
    expression-expose-model.domain-name: RemoteJMX
    jmx-remoting-connector:
      use-management-endpoint: true
    resolved-expose-model.domain-name: RemoteJMX
    show-model: true
  datasources:
    data-sources:
      MyDataSourceName:
        driver-name: com.microsoft.sqlserver
        connection-url: jdbc:xyz
        statistics-enabled: true

Upvotes: 0

Views: 310

Answers (1)

Ladicek
Ladicek

Reputation: 6607

First of all, WildFly Swarm 2018.2.0.Final is very old. In the meantime, WildFly Swarm got renamed to Thorntail; you can automatically migrate by running mvn io.thorntail:thorntail-maven-plugin:2.5.0.Final:migrate-from-wildfly-swarm.

And then: if you connect to JMX, do you see any WildFly MBeans at all? I mean, is the problem with datasources only, or is it more general?

During boot, you should see JMX-related log messages, such as JMX not configured for remote access or JMX configured for remote connector: implicitly using ... interface. Do you see any of them?

Finally, it seems you want JMX exposed on the management port. Do you have a dependency on the management fraction?

Upvotes: 1

Related Questions