如何查看/监视数据库池中的实时数据库连接?

发布于 2024-09-27 20:02:04 字数 147 浏览 11 评论 0原文

我们为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不乱于心 2024-10-04 20:02:04

我不确定 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

鸠魁 2024-10-04 20:02:04

我也在寻找这个问题,可以从以下位置收集我需要的东西:

org.apache.commons.dbcp.BasicDataSource< /p>

如果您使用Spring 很容易将这些信息注入到您的 bean 中并从该对象中检索您需要的内容,该对象将被注入并已经为您实例化。

有任何问题请告诉我!

I was searching for this issue too and could collect what I need from:

org.apache.commons.dbcp.BasicDataSource

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文