ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tushar Rahman" <tusharh2...@hotmail.com>
Subject Re: Classloading: getContextClassLoader returns URLClassLoader in 1.6beta2
Date Thu, 06 Nov 2003 01:44:21 GMT

Hi ,

Thanks for the reply. I am new to ant so please bear with me.

" Firstly it would need to be set prior to setting each property
(the setXXX) methods in addition to the execute method. "

Yes I think all code executing inside the custom task should get the same 
classloader including the addXXX method.

" What about if you were to use another task when executing your task? 
You've got to know about
the task's designated classloader (which may not be the loader actually used
to load a class)"

I am not sure I understand this. if you use another task then that task 
should either be loaded from the same classloader as this task(probably 
belongs to the same jar as this task) or should be loaded by a classloader 
that is the parent of this classloader.
so does ant follow this classloading hierarchy ?
URLClassLoader --> loads all the ant jars.
AntClassLoader --> loads all the custom tasks and is a child of the above 
URLClassLoader. is  a new
                          AntClassLoader created for each jar in the 
ClassPathElement ? if yes then I
                          understand that one custom task in one jar would 
not be able to use a another
                          custom task in a different jar.


Thanks
Tushar

_________________________________________________________________
MSN Hotmail now on your Mobile phone. 
http://server1.msn.co.in/sp03/mobilesms/ Click here.


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


Mime
View raw message