quality@glassfish.java.net

Re: [semi-OT] JDBC Connection Pool debugging?

From: Sankar Neelakandan <Sankar.Neelakandan_at_Sun.COM>
Date: Wed, 16 Sep 2009 07:04:35 -0700

Kristian Rink wrote:
> Folks;
>
> somewhat off-topic yet interesting, maybe someone has some idea: In one of
> our installments at the moment we're trying to track down a peculiar error
> slowing down (and eventually, sooner or later) bringing our RDBMS / SQL
> backend to a painful halt. We noticed that some threads inside the DBMS are
> "slow" and/or locked up in long-running / terminated(?) queries, and we are
> trying to figure out what happens. It's not all related to the Java EE
> server, but it has at least partly been involved here.
>
> Question: Having a JDBC resource / connection pool defined in Glassfish v2,
> is there a way of figuring out which of the pooled connections are active
> and, ideally, which statement they are processing at the moment? If so, how?
> If not, how do you track down things like that?
>
You can use callflow monitoring feature of v2 to trace the flow of
execution, but its not going to tell you what is happening inside a
method/connection thread.
Try it and see whether it is helpful.

asadmin start-callflow-monitoring server (or) use AdminGUI to enable
callflow for DAS or any other instances.
In AdminGUI monitoring page you will also see a callflow tab which you
can use to view the details of method flow.

-Sankar
> TIA and all the best,
> Kristian
>
>
>