geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stig larsen <s...@exectiva.no>
Subject Re: Dynamically load jars in running state
Date Thu, 18 Jun 2009 10:31:28 GMT

Thank you for your swift reply Jack,

I'm also looking into the Gbean and dependency injection, and it seems like
it could be done from here aswell?
The idea is to insert this extensions (jar file) to the geronimo repository
and dynamically load them from there.

Is using MultiParentClassLoader  the preferred method?

Best regards,
Stig Even Larsen



Jack Cai wrote:
> 
> There is a very Geronimo-specific way with which you can hack with the
> application classloader.
> 
> import org.apache.geronimo.kernel.config.MultiParentClassLoader;
> 
>   ...
>   url = a certain folder or a jar file
>   MultiParentClassLoader cl = (MultiParentClassLoader)
> Thread.currentThread.getContextClassloader();
>   cl.addURL(url);
>   ...
> 
> Good luck.
> 
> -Jack
> 
> 2009/6/18 stig larsen <stig@exectiva.no>
> 
>>
>> Hi,
>>
>> We have an application that we wish to extend its capabilities in running
>> state.
>> I want to load jars into geronimo and make them appear in the classpath
>> so
>> my application can use them without restarting.
>>
>> Is there a way to to this?
>>
>> Best regards,
>> Stig Even Larsen
>> --
>> View this message in context:
>> http://www.nabble.com/Dynamically-load-jars-in-running-state-tp24087873s134p24087873.html
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Dynamically-load-jars-in-running-state-tp24087873s134p24090342.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message