db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Burlison <Alan.Burli...@sun.com>
Subject Re: Derby causes PermGen leaks in Tomcat
Date Mon, 24 Sep 2007 16:39:02 GMT
Alan Burlison wrote:

> Also, I've put code in that manually unregisters the EmbeddedDriver, but 
> I'm a bit puzzled because it doesn't seem to be loaded in the first 
> place - I've added code to list the loaded drivers befor and after the 
> unload, and here is what I see:
> 
> Unloading org.apache.derby.jdbc.EmbeddedDriver@1e91259
> Before
> sun.jdbc.odbc.JdbcOdbcDriver@35e6e3
> org.apache.derby.jdbc.AutoloadedDriver@1a2760f
> org.apache.derby.jdbc.ClientDriver@1cd2b82
> After
> sun.jdbc.odbc.JdbcOdbcDriver@35e6e3
> org.apache.derby.jdbc.AutoloadedDriver@1a2760f
> org.apache.derby.jdbc.ClientDriver@1cd2b82
> 
> It does seem to point to the AutoloadedDriver as being the problem 
> though...

I've added code to deregister all the Derby drivers on shutdown, I 
iterate over the loaded drivers and call DriverManager.deregisterDriver 
on any drivers that are in the org.apache.derby.jdbc package:

Before
sun.jdbc.odbc.JdbcOdbcDriver@185572a
org.apache.derby.jdbc.ClientDriver@5aebd9
org.apache.derby.jdbc.AutoloadedDriver@113981b
After
sun.jdbc.odbc.JdbcOdbcDriver@185572a

However, jstack *still* shows an instance of derby.antiGC is running, so 
although DERBY-2905  may be a factor, I think there is another problem 
as well.

-- 
Alan Burlison
--

Mime
View raw message