hikaricp get number of busy connection

2019-09-01 05:47发布

Like we can get the number of busy connection in c3p0 by using method like dataSource.getNumBusyConnections(), the same way how can we do that in case of hikaricp? Can anyone provide all the related methods between c3p0 and hikaricp? Also what is the destroy (in c3p0) method equivalent in hikaricp?

1条回答
对你真心纯属浪费
2楼-- · 2019-09-01 06:17

Re: connections, see these wiki pages:

JMX Monitoring (via console and programatically

Using Codahale/Dropwizard Metrics

HikariDataSource supports both close() and shutdown() methods, they are equivalent.

UPDATE: I put out a simple gist that uses JMX you can try.

查看更多
登录 后发表回答