dev@glassfish.java.net

Re: Reloading a module without restarting the domain?

From: Richard S. Hall <heavy_at_ungoverned.org>
Date: Tue, 06 Jul 2010 08:53:29 -0400

On 7/6/10 4:33, Jerome Dochez wrote:
> On 6/29/10 5:21 PM, Chris Kasso wrote:
>> Is it possible?
> no !
>> I drop a module into the modules directory, start up the domain
>> and get the module to the Active state. I then drop in a new
>> build of the module into the modules directory replacing the old copy.
>> How do I get GF/Felix to reload the module without restarting the
>> domain?
>>
> you can't. the modules wired to the old version will continue to use
> the old version. if a new module was to request explicitly the new
> version, then the new bundle would be loaded (the two versions would
> then co-exist). The only way IIRC to reload a module is to first stop
> all bundles using the old version, uninstall the old version, install
> the new version and restart all stopped modules. We don't support this
> automatically as it is very complicated to achieve since our bundles
> are not expecting to be unloaded/reloaded.

If you telnet into the Felix shell (usually "telnet localhost 6666"),
then you can refresh the updated bundle (type "refresh <bundle-id>"),
which will automatically do the steps listed by Jerome. If you are using
autodeploy directory, which uses File Install, then I believe this
happens automatically.

-> richard

>> I tried telnet'ing to the Felix remote shell console and used
>> various commands (refresh<module id>, update<module id>,
>> uninstall<module id>) but known appeared to cause the new version
>> of the module to be loaded. It continued to use the old
>> module (even though it had been replaced in modules directory).
>>
>> The only way I could get the replacement module loaded was
>> to restart the domain.
> correct.
>> Chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>