-
1. Re: Get Available connection via java code
mayerw01 Aug 28, 2015 7:39 AM (in response to gurusathish)You may read the statistics via cli, like:
../jboss-cli.sh --connect --command='/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-attribute(name=AvailableCount)'
./jboss-cli.sh --connect --command='/subsystem=datasources/data-source=ExampleDS/statistics=pool:read-attribute(name=InUseCount)'
-
2. Re: Get Available connection via java code
gurusathish Aug 28, 2015 8:55 AM (in response to mayerw01)Hi Wolfgang Mayer,
Thank you for your response....
My requirement is to get available connection printed via java code , so that i can easily find out where the connection is reduced. So please help in getting num.of available connection via java code and printed on the console.
Thanks............
-
3. Re: Get Available connection via java code
mayerw01 Aug 31, 2015 8:56 AM (in response to gurusathish)If the statistics are enabled it should be possible to get these values via MBeans like
jboss.as:subsystem=datasources,xa-data-source=datasourcename,statistics=pool
-
4. Re: Get Available connection via java code
gurusathish Sep 1, 2015 3:03 AM (in response to mayerw01)Hi Wolfgang Mayer,
Thank you for your response.... I will try this and will give you a feed back............