I read from DBCP2 documentation that this new version supports JMX monitoring for connection pool, but I couldn't find any example which shows actual usage.
I have a simple JDBC based java application which uses dbcp2 to create a connection pool which is used by a simple query service, and I want to monitor these connection via another tool like VisualVM using JMX.
DBCP2's BasicDataSource
has methods like setJmxName()
which I don't see any usage for that, and don't know how to use it.
If someone is not familiar with JDBC, you can read about it here.
Any help on this will be appreciated. Thanks!