如何查看/监视数据库池中的实时数据库连接?
我们为 Java 应用程序使用数据库连接池。它是一个在tomcat下运行的Web应用程序。
我想查看池中创建和销毁的实时连接。有人可以帮忙吗?
更新:我们正在使用 Oracle 11g。我们使用 DDConnectionBroker 库进行连接池。
We use database connection pooling for our java application. It is a web app run under tomcat.
I want to view live connections in the pool as they are created and destroyed. Can somebody please help?
UPDATE: We are using Oracle 11g. We use DDConnectionBroker library for connection pooling.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定 DDConnectionBroker 库中是否有任何连接监视 API...如果您想要更多透明度,我会推荐 Proxool。
http://proxool.sourceforge.net/
另外查看 DBCP 和 CP30,DBCP 是最好的
http://www.java2s.com/Product/Java/Database/Connection -Pool.htm
I am not sure if there are any connection monitoring API's in DDConnectionBroker library... I would recommend Proxool if you want more transparency.
http://proxool.sourceforge.net/
Also check out DBCP and CP30, DBCP is the best in the bucket
http://www.java2s.com/Product/Java/Database/Connection-Pool.htm
我也在寻找这个问题,可以从以下位置收集我需要的东西:
如果您使用Spring 很容易将这些信息注入到您的 bean 中并从该对象中检索您需要的内容,该对象将被注入并已经为您实例化。
有任何问题请告诉我!
I was searching for this issue too and could collect what I need from:
If you are using Spring is so easy to inject this information on your bean and retreive what you need from this object, that shall came injected and already instantiated for you.
Any questions let me know!