users@glassfish.java.net

How to know what my jdbc connection pool is up to

From: <glassfish_at_javadesktop.org>
Date: Tue, 20 Oct 2009 06:29:32 PDT

Hi

I was wondering if there is some way for my to find out what each connection in my jdbc connection pool is doing at any given time. If I could get a stack trace for each connection in the pool that would be cool. I know this is possible because the leak detection feature can give me a stack trace for a suspected leak.

Or maybe there is some other way like registering a listener with the connection pool to let me know when connections are acquired and released.

The basic problem is that the pool runs out of connections but a thread dump of the appserver reveals that only a few threads are busy in my code. So I'm trying to figure out what is happening to the connection. Looking at the code it seems fine but I assume there must be some problem because the connection pool code in glassfish should be well debugged.

Thanks
Eduard
[Message sent by forum member 'eduardp' (eduard.penzhorn_at_momentum.co.za)]

http://forums.java.net/jive/thread.jspa?messageID=368607