db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Rudy <ronchal...@gmail.com>
Subject Re: question: is is possible to identify open resources?
Date Tue, 14 Sep 2010 17:17:02 GMT
On Tue, Sep 14, 2010 at 1:07 PM, Patrick Holthuizen <patrick@eaze.org> wrote:
>> Is there a specific reason why you don't want to close the connection?
> Just performance.

What I'm assuming you're looking for here is leaks to ensure that all
resultsets/statements/etc. are closed, yes?

In theory what you COULD do is wrap your connection object and have it
produce something like a "TraceableStatement" and "TraceableResultSet"
that likewise wrap the implementation returned by the Derby connection
object.  Then at the end interrogate these to see if any remain

That would be also pretty extensive, but there may very well be a
project out there dedicated to that sort of "tracing" JDBC
implementation to help development debug resource leaks.  You might
want to take a look around.


View raw message