-
1. Re: PeakInUseCount in jdbc on jboss-eap-6.1 , ¿it's possible?
marc.cortinas Dec 1, 2015 2:17 AM (in response to marc.cortinas)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