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:
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.