ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: Preventing Parent Classloading
Date Wed, 15 Oct 2003 09:29:28 GMT
Conor MacNeill wrote:

>>From: Dominique Devienne [mailto:DDevienne@lgc.com]
>>
>>Note that it's often dangerous to break the delegation model of class
>>loaders... Works sometimes, but be aware we're breaking the rules. --DD
>>
>>    
>>
>
>Absolutely. I would caution against violating the requirement to delegate 
>to parent loaders. It can cause a lot of problems some of which are not
>easily repeatable (i.e. they depend on timing and garbage collection 
>operations). It may work once and then fail the next time. 
>
>It can be done but you need to be clear about what is happening. Ant does
>it in two places (the <java> and <junit> tasks).
>
>Conor
>  
>
And I have finally got my code to work by extracting the necessary code 
from <java> and ExecuteJava. Unfortunately, I don't have much choice but 
to use my own classloader first (at least before the Ant one, not 
necessarily before a root classloader),. as Cocoon requires a different 
version of Avalon logging from that in the Ant Velocity jar.

Thanks for the warning. As I say, is there any way I could've done it 
differently?

Regards, Upayavira

>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message