Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 19048 invoked from network); 15 Nov 2005 21:16:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Nov 2005 21:16:54 -0000 Received: (qmail 78052 invoked by uid 500); 15 Nov 2005 21:16:51 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 78006 invoked by uid 500); 15 Nov 2005 21:16:50 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 77995 invoked by uid 99); 15 Nov 2005 21:16:50 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2005 13:16:50 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 20AA3E1 for ; Tue, 15 Nov 2005 22:16:29 +0100 (CET) Message-ID: <1971134097.1132089388640.JavaMail.jira@ajax.apache.org> Date: Tue, 15 Nov 2005 22:16:28 +0100 (CET) From: "David Jencks (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Commented: (GERONIMO-1177) URLJarFile memory leak In-Reply-To: <965093237.1132078047972.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GERONIMO-1177?page=comments#action_12357726 ] David Jencks commented on GERONIMO-1177: ---------------------------------------- Jeff, you missed the new files Adding modules/common/src/java/org/apache/geronimo/common/GeronimoEnvironment.java Adding modules/common/src/test/org/apache/geronimo/common/GeronimoEnvironmentTest.java Transmitting file data .. Committed revision 344443. > URLJarFile memory leak > ---------------------- > > Key: GERONIMO-1177 > URL: http://issues.apache.org/jira/browse/GERONIMO-1177 > Project: Geronimo > Type: Bug > Components: common > 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 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4167874 -- sun.net.www.protocol.jar.JarFileFactory 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. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira