db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: Momory leak in JDBC driver?
Date Tue, 06 Sep 2005 07:43:15 GMT
>>>>>>>>>>>> Kathey Marsden wrote (2005-09-05 21:07:55):
> Bernt M. Johnsen wrote:
> 
> >>>>>>>>>>>>>Dyre.Tjeldvoll@Sun.COM wrote 
> >>>>>>>>>>>>>
> >>
> >>Two things:
> >>
> >>1) Are you closing your ResultSets? If just let the ResultSet objects
> >>   pass out of scope without closing them, they will be "leaked". That
> >>   is, the driver keeps a linked list of them so they won't be
> >>   gc'ed. I have experienced this myself, but I don't know if there is
> >>   a JIRA issue for it
> >>    
> >>
> >
> >Slike ting kan fikses med WeakReference...
> >  
> >
> 
> I know about this issue for Prepared Statements,  
> http://issues.apache.org/jira/browse/DERBY-210,
> but was not aware of it for ResultSets.   If there is a separate issue
> for ResultSets  please file it.
> 
> java org.apache.derby.drda.NetworkServerControl runtimeinfo
> 
> shows  all open prepared statements so can be used to determine if
> DERBY-210 is the issue in this case.
> The workaround is to explicitly close the  prepared statements.
> 
> Regarding a code solution, I don't  know about the Norwegian part, but
> "blah, blah WeakReference" sounds right to me.   It would be nice to see
> someone pick up this bug for 10.1.2.

Thank you ;-) We did similar things in another JDBC driver a couple
years ago. So the question becomes: Is this a new JIRA Issue? And is
it a general problem for seveal classes?

-- 
Bernt Marius Johnsen, Database Technology Group, 
Sun Microsystems, Trondheim, Norway

Mime
View raw message