geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevan Miller (JIRA)" <>
Subject [jira] Closed: (GERONIMO-1177) URLJarFile memory leak
Date Sat, 02 Feb 2008 16:22:08 GMT


Kevan Miller closed GERONIMO-1177.

> URLJarFile memory leak
> ----------------------
>                 Key: GERONIMO-1177
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: common
>    Affects Versions: 1.0-M5
>         Environment: Win XP/ JDK 1.4.2
>            Reporter: Kevan Miller
>            Assignee: Jeff Genender
>             Fix For: 1.0
>         Attachments: urljarfile.patch
> There is a Sun bug which is causing a memory leak of URLJarFile instances in Geronimo.
The problem is caused by --
will hold onto strong references to all URLJarFile instances. So URLJarFiles can never be
GCed. This means that for every deploy/undeploy of an application, you'll leak URLJarFiles.
> The problem can be avoided by calling URLConnection.setDefaultUseCaches(false); This
will turn off the caching in JarFileFactory. 
> I have a fix which adds a GeronimoEnvironment class that can be used to perform common
environment setup for server, client, and deployer processes. GeronimoEnvironment.init();
is invoked as appropriate from these three process environments. init() currently only sets
DefaultUseCaches to false. There may be other functions which we could move there, but I didn't
investigate too deeply...
> Note that setDefaultUseCaches(false) is a "global" setting. So it affects the entire
runtime. URLConnection.setUseCaches(false) does not fix the problem.
> I'll post my patch, shortly...

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message