ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject Re: classloader for 1.7
Date Wed, 13 Sep 2006 00:22:14 GMT
Hi Dominique,

my custom task did not create a classloader, at least not "consciously". The custom task was
defined with <taskdef/>. I simply saw that putting the JNDI driver in the classpath
of the taskdef did not work.

Regards,

Antoine
-------- Original-Nachricht --------
Datum: Tue, 12 Sep 2006 18:57:04 -0500
Von: "Dominique Devienne" <ddevienne@gmail.com>
An: "Ant Developers List" <dev@ant.apache.org>
Betreff: Re: classloader for 1.7

> > I had a problem with a custom task which I had written which was using
> JNDI. This task had a runtime dependency on a JNDI driver for MQ Series.
> Adding the JNDI driver to the classpath of the taskdef never worked, the only
> thing that worked was to start ant with a -lib fullpathtoMQJNDI.jar. I
> assumed that the reason is that the JNDI driver is loaded by the JDK runtime,
> so only indirectly from my custom task.
> 
> JDK code, loaded by the bootstrap class loader, depends I believe on
> the context class loader to locate/load discovered services. I believe
> the CL set by Launcher is set as the context loader, which is why it
> worked, whereas the CL you created in your custom task wasn't the
> context one maybe? I'm just guessing of course. --DD
> 
> ---------------------------------------------------------------------
> 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