Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 82934 invoked from network); 7 Sep 2003 02:47:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Sep 2003 02:47:25 -0000 Received: (qmail 62008 invoked by uid 500); 7 Sep 2003 02:46:43 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 61925 invoked by uid 500); 7 Sep 2003 02:46:42 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 61897 invoked from network); 7 Sep 2003 02:46:41 -0000 Received: from unknown (HELO jetty.mortbay.com) (209.235.192.112) by daedalus.apache.org with SMTP; 7 Sep 2003 02:46:41 -0000 Received: (qmail 801 invoked from network); 7 Sep 2003 02:46:45 -0000 Received: from cpe-203-45-77-110.nsw.bigpond.net.au (HELO mortbay.com) (janb@203.45.77.110) by jetty.mortbay.com with SMTP; 7 Sep 2003 02:46:45 -0000 Message-ID: <3F5A9A78.9050700@mortbay.com> Date: Sun, 07 Sep 2003 12:39:52 +1000 From: Jan Bartel Reply-To: janb@mortbay.com Organization: Mort Bay Consulting User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030430 Debian/1.3-5 X-Accept-Language: en, en-us MIME-Version: 1.0 To: geronimo-dev@incubator.apache.org Subject: Re: [Classloaders] Establishing the Classloader hierarchy at deployment time References: <01D1F9C6-E0D7-11D7-B8F0-000393DB559A@coredevelopers.net> In-Reply-To: <01D1F9C6-E0D7-11D7-B8F0-000393DB559A@coredevelopers.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Dain, >> I have patched, but not yet committed, the ClassSpace constructor to >> set a parent for the classloader like so: >> >> public ClassSpace(String name, URL[] urls) >> { >> super(urls, >> Thread.currentThread().getContextClassLoader()!=null? >> Thread.currentThread().getContextClassLoader() >> : >> ClassSpace.class.getClassLoader()); >> . >> . >> . >> } >> >> >> If anybody has a good reason for this patch not to be committed, then >> speak now, or it will go into the codebase today. > > > I don't think you don't want to do that. Class space is a registered > JMX class loader, so I believe that it's parent should be the main JMX > class loader. I think this is necessary for JMX 1.2 class loading to > work properly. If you wait a few hours I should have the kernel stuff > sorted and Jason should be a wake to take it the last mile. I am happy not to commit this right now and wait a couple of hours. I am able to make progress with this patch in place for me locally. However, I can't see what you're saying about the parent of the ClassSpace being the main JMX class loader - the code never sets a parent classloader for a new ClassSpace instance at all, let alone setting it explicitly to the JMX one. Surely each classloader needs to have it's parent set in order for delegation to work correctly? Otherwise, we definitely will wind up with having to have everything on the system classpath???! Jan