hikaricp get number of busy connection

旧巷老猫 提交于 2019-12-12 04:49:12

问题


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.



来源:https://stackoverflow.com/questions/27268286/hikaricp-get-number-of-busy-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!