dev@glassfish.java.net

Re: Reloading a module without restarting the domain?

From: Sanjeeb Sahoo <sahoo_at_sun.com>
Date: Wed, 30 Jun 2010 10:29:00 +0530

On Wednesday 30 June 2010 10:14 AM, Chris Kasso wrote:
> On 6/29/2010 9:31 PM, Sanjeeb Sahoo wrote:
>> Chris,
>>
>> Bundles in modules/ dir are not watched for changes while the server
>> is running; bundles in modules/autostart/ are.
>
> I'll give autostart a try.
>
>>
>> What makes you think even after issuing "update <bundle id>," the
>> bundle was not updated?
>
> I modified the output the module generated but I did not see the
> modification after I performed the update or uninstall. I only saw
> the change after the domain was restarted.
>
> If "Active" module A depends on "Active" module B and B is updated
> what does A use - old A or updated A?
A continues to use old B until either B or the framework is refreshed.
So, try issuing a refresh <bundle id of A> after updating B.
>
> I'd still like to understand what refresh vs update does as well as
> what happens when you uninstall a module while other Active modules
> have dependencies on it. Is this spec'ed out anywhere?
Even when you uninstall, an old copy is maintained until refresh happens.
Yes, they are very much part of the OSGi spec which you can download
from http://osgi.org.

Thanks,
Sahoo