Hi Joe,
we have already done something shooting into this direction. Whenever we
open the connection we add some log entry and also add an associated
log entry when we purposely close the connection.
This, however is a quite a chunk of work as we are dealing with a huge
code base. I have read a while ago about tools that detect e.g. not
released memory in C and C++ code. I have no practice experience but I
would guess that there is a similar QA tool for Java. Thank you, Jochen
> I would decompile the JDBC driver's connection class, and alter it to
> record a stacktrace of where is is created, then recompile that class as
[quoted text clipped - 7 lines]
>
> Joe Weinstein at BEA

Signature
Jochen Reitzig
+1-408-718-1174
mailto: jochen.reitzig_Place_AT_here_web.de
San Jose, CA
Robert Klemme - 10 Mar 2004 07:46 GMT
> Hi Joe,
I'd say the correct spelling is "Hey Joe" as in
http://www.daily-lyrics-4all.com/Hey_Joe_Lyrics.html
:-)
> we have already done something shooting into this direction. Whenever we
> open the connection we add some log entry and also add an associated
[quoted text clipped - 3 lines]
> released memory in C and C++ code. I have no practice experience but I
> would guess that there is a similar QA tool for Java. Thank you, Jochen
Optimizeit does a quite good job at detecting leaks. The only problem
with these memory analyzers is that they have to process a huge amount of
data in a typical appliaction which may or may not work depending on the
resources of your machine.
Then there's JMP which I didn't use yet:
http://www.khelekore.org/jmp/
I'd like to add two other options:
(i) Trace program execution. Here are some options:
http://alfj.sourceforge.net/
http://www.geocities.com/mcphailmj/Trace/
http://www.experimentalstuff.com/Technologies/TracingJVM/index.html
(ii) Wrap the whole JDBC layer with your own classes that delegate to the
real drivers classes and emit some interesting diagnostic information.
The downside is that this is quite tedious since there are quite some
classes to be implemented if you want to do it completely. In your case,
Connection and some of the Statement derivates might suffice.
Kind regards
robert