1 Reply Latest reply on Dec 1, 2015 2:17 AM by Marc Cortinas

    PeakInUseCount in jdbc on jboss-eap-6.1 , ¿it's possible?

    Marc Cortinas Newbie

      Hello,

       

       

      I think the same way JMX publish the peak thread count (jmx: java.lang:type=Threading,PeakThreadCount ) could be usefull jmx publish the same metric but for each JDBC connection pool ( joss.as:subsystem=datasources,data-source=ExampleDS,PeakInUseCount)

      Out application is running on jboss-eap-6.1 and this application makes a very fast queries to connections to database and if we want grow up I think this improvement help us to apply a max-pool connections more trustly in our infraestructure.

       

      Do you know if it is possible capture this metric on JMX? ( I looked for in JMX without lucky )

       

      Best,

      Marc

        • 1. Re: PeakInUseCount in jdbc on jboss-eap-6.1 , ¿it's possible?
          Marc Cortinas Newbie

          Hi,

           

          Finally, JMX publish the metric MaxUsedCound if statistics is enabled, this is the metric needed. In Jboss EAP 6.1, statistics were disabled by default. So you must specifically enable them, which you must be doing after the server has started as you need to use statistics-enabled="true" in your datasource config. Enabling it via CLI in EAP 6.1 doesn't persist the change.

           

          Statistics are only gathered after the statistics have been enabled. So if you are enabling it after the server has started it may show a slightly odd picture.

           

          Perhaps It is suggested that you need to add the * statistics-enabled="true" * attribute to your datasource configuration, restart, and check the datasource statistics again.

           

          You can enable  *statistics enabled* attribute by using the following CLI command:

          ~~~

          /subsystem=datasources/data-source=ExampleDS:write-attribute(name=statistics-enabled, value=true)

          ~~~

          After adding the attribute: *statistics-enabled="true" *  in your datasource configuration., You can run the below CLI command to check  datasource statistics:

          Doamin mode:

          -----------

          ~~~

          /host=master/server=server-one/subsystem=datasources/data-source=<your_datasource_name>/statistics=pool:read-resource(include-runtime=true)

          ~~~

          Standalone mode:

          ----------------

          ~~~

          /subsystem=datasources/data-source=<your_datasource_name>/statistics=pool:read-resource(include-runtime=true)

          ~~~

           

          Marc