Robert Harryman wrote:

Next I added classloading of the embedded derby driver, did a shutdown of the database and unregistered the driver. Using jmap/jhat (jdk 1.6) I see that all my objects are being kept alive and that there are a lot of derby static refs around to java.util.logging.Logger. This leak will force me to bounce the container during redeploy since PermGen will eventually exhaust and cause an out of memory condition.

Is this a known problem? Does derby/javaDB have a bug against static references to log objects?

As far as I know, Derby does not use the java.util.logging package at all, so your findings puzzle me. Then again, maybe I am misunderstanding what you are asking...

(Derby (and Java DB) versions up to and including 10.2 support J2SE 1.3, which does not include the logging API).

Do you get similar results (references to java.util.logging.Logger) if you run the following query in jhat's OQL tool?

select referrers(f) from java.util.logging.Logger f

(lists Java objects that hold reference to java.util.logging.Logger)

or for example

select referees(heap.findClass("org.apache.derby.impl.services.monitor.BaseMonitor"))

(returns an array of Java objects to which the given Java object directly refers to).



--
John


Reply via email to