ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject Re: Using classloader for Junit
Date Fri, 20 Jun 2003 05:15:26 GMT
Conor MacNeill wrote:

>> >BTW, I don;t really agree with the <classloader> 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 <classloader> scheme is actually much safer than what
jboss is using.

I'm sure there will be some combination of loaders where <classloader> may
generate an error, but it's better than any other scheme that I know or
tried so far. 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message