From dev-return-47162-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Fri Jun 20 05:15:17 2003 Return-Path: Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 77248 invoked by uid 500); 20 Jun 2003 05:15:17 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 77227 invoked from network); 20 Jun 2003 05:15:16 -0000 Received: from main.gmane.org (80.91.224.249) by daedalus.apache.org with SMTP; 20 Jun 2003 05:15:16 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19TEF5-0002Vb-00 for ; Fri, 20 Jun 2003 07:15:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@ant.apache.org Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19TEF5-0002VO-00 for ; Fri, 20 Jun 2003 07:15:19 +0200 From: Costin Manolache Subject: Re: Using classloader for Junit Date: Thu, 19 Jun 2003 22:15:26 -0700 Lines: 32 Message-ID: References: <3EF169B2.5090108@chalko.com> <200306200107.59659.conor@cortexebusiness.com.au> <3EF1D973.3090903@chalko.com> <200306201117.44971.conor@cortexebusiness.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@main.gmane.org User-Agent: KNode/0.7.2 Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Conor MacNeill wrote: >> >BTW, I don;t really agree with the task being used to >> >modify >> > the effective classpath of running ClassLoaders. I'm sure this will >> > cause trouble too. >> >> Seems to break some of the "properties are immutable" philosophy of ant. > > No - not really an Ant level issue. I am concerned by the scenario where a > classloader with a child can not find a class on the first instance > causing the child to load the class. If that class is later added to the > loader's classpath, it becomes possible for parent to load the class and > then we have a parent and child loader with the same class loaded ----> > bad stuff happens. That's a pretty common case in tomcat or any container using reverse loaders, and usually nothing bad happens. Jboss is also using a flat loader where classes are added dynamically - and seems to be fine in most cases ( or at least more reliable than other alternative ). The scheme is actually much safer than what jboss is using. I'm sure there will be some combination of loaders where may generate an error, but it's better than any other scheme that I know or tried so far. Costin --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org