dev@glassfish.java.net

Re: Reloading a module without restarting the domain?

From: Jerome Dochez <jerome.dochez_at_oracle.com>
Date: Tue, 06 Jul 2010 01:33:45 -0700

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.
> 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
>
>