Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 81367 invoked by uid 500); 22 Aug 2001 05:24:15 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 81357 invoked from network); 22 Aug 2001 05:24:15 -0000 X-Authentication-Warning: bodewig.bost.de: bodewig set sender to bodewig@apache.org using -f To: ant-dev@jakarta.apache.org Subject: Re: task & class loader question References: From: Stefan Bodewig Date: 22 Aug 2001 07:24:19 +0200 In-Reply-To: Gary Shea's message of "Tue, 21 Aug 2001 10:18:23 -0600 (MDT)" Message-ID: Lines: 28 User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Tue, 21 Aug 2001, Gary Shea wrote: > I don't know a thing about classloaders, and there's only one > example of AntClassLoader being used in the taskdefs (SQLExec) so > I'm wondering if I'm on the right track or not... Hmm, take a look at Definer (used to be Taskdef in 1.3), Java or JUnitTask for other examples. > Is there a writeup somewhere that I've missed? Nope, apart from the Javadocs there is nothing. > Am I right that the main thing to watch out for is having the same > class loaded by two different classloaders? Java expects each classloader to consult the "parent" class loader before looking up the class itself, so most of the time you won't load the same class via different classloader - but if that happens, things are going to become, errm, difficult. > So as long as the classloader does the pass-it-to-the-parent-first > thing, adding a classloader with unique jars and classes is no big > deal? Right. Stefan