Let me re-run the tests and see exactly what events appear in the logs (I think 
they all appear in the logs)
Ian

On 19 Jan 2011, at 13:58, Justin Edelson wrote:

> Bundles are updated...
> 
> BootstrapInstaller.java:615
> 
> installedBundle.update(ins);
> 
> My reading of the OSGi spec is that this should fire the UPDATED event
> regardless of the previous state of the bundle (i.e. STOPPED in this case),
> but maybe that's a misread on my part.
> 
> Justin
> 
> On Tue, Jan 18, 2011 at 5:01 AM, Ian Boston <[email protected]> wrote:
> 
>> Hi,
>> If I upgrade a bundle when the OSGi container is not running then the
>> ContentLoader service doesn't recognise that the bundle has been upgraded.
>> 
>> Upgrading can be achieved in the bootstrap by deleting
>> sling/felix/bundle0/bootstrapinstaller.ser before startup.
>> The bundles that have been upgraded cause a new version to appear in
>> sling/felix/bundle*/versionx.y with the other bundle files being updated.
>> The bootstrap loader is quite precise, only upgrading those bundles that are
>> really new. (later version or if SNAPSHOT, later Bnd-LastModified time)
>> 
>> However, since the OSGi UPDATED event never fires the
>> ContentLoaderServiceImpl does not upgrade the bundle or its content.
>> 
>> AFAICT, the SGI UPDATED event never fires, because the bundle is simply
>> started, and not updated.
>> 
>> I wonder if, at line 146 in ContentLoaderSeriviceImpl, there is a way of
>> correctly setting isUpdate when the bundle was upgraded with the OSGi
>> container not running ?
>> 
>> ContentLoaderSeriviceImpl:147 is
>> final boolean isUpdate =
>> this.updatedBundles.remove(bundle.getSymbolicName());
>> 
>> Ian

Reply via email to