[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Is this a bug?

Danail is correct. Reference installs are not spec'ed but most implementations seem to support some form of reference install.

Reference installs does not prevent dynamic updates of bundles though. It is only a way to tell the framework not to copy the content into its local storage, instead the framework uses the content as-is from the reference location. Reference installation should only be used if the storage area where the bundle content is placed is controlled by the management agent. The framework assumes the reference location is stable and will not be modified while the bundle is installed in a framework. In Equinox this is very useful for p2 so that pools of bundles can be managed and installed into multiple instances of the Framework without duplicating the bundle contents on disk.

If you want to update a bundle from a reference location then you must use the Bundle.update(InputStream) method to point to another location on disk. For example,

Bundle b = context.installBundle("reference:file:/mybundles/some.bundle_1.0.0.jar");
URL version2 = new URL("reference:file:/mybundles/some.bundle_2.0.0.jar");



Inactive hide details for Danail Nachev ---09/24/2008 08:23:15 AM---Such behavior is not spec'ed, but I think every OSGi implemDanail Nachev ---09/24/2008 08:23:15 AM---Such behavior is not spec'ed, but I think every OSGi implementation


Danail Nachev <d.nachev@xxxxxxxxxx>


Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


09/24/2008 08:23 AM


Re: [equinox-dev] Is this a bug?

Such behavior is not spec'ed, but I think every OSGi implementation
supports some form of reference installation.

Danail Nachev
Senior Software Engineer/Development Tools
ProSyst Labs EOOD
stay in touch with your product.

Stuart McCulloch wrote:
> 2008/9/24 Niclas Hedhman <niclas@xxxxxxxxxxx <
>     On Wed, Sep 24, 2008 at 5:12 PM, Danail Nachev <d.nachev@xxxxxxxxxx
>     <
mailto:d.nachev@xxxxxxxxxx>> wrote:
>         If bundles are installed by reference (via reference: URL) Equinox
>         doesn't guarantee anything to bundles which you replace, while
>         they are
>         still running. Although OSGi is considered dynamic, such
>         scenarios are
>         not supported. AFAIK, p2 and old Eclipse Update installs all
>         bundles by
>         reference.
>         Such scenarios can be supported if the bundle was copied to the
>         Equinox
>         storage and not referenced. Bundles which are installed through
>         Bundle.installBundle(String, InputStream) and
>         Bundle.installBundle(String) are copied (unless the URL passed
>         to the
>         installBundle(String) is reference: URL) are copied to the storage.
>     I find this behavior interesting... Is this behavior supported by
>     the specification explicitly, or does it just not cover it??
> I couldn't find any explicit mention in the spec, but FWIW we also
> support the reference: scheme in Felix
>     Cheers
>     Niclas
>     _______________________________________________
>     equinox-dev mailing list
>     equinox-dev@xxxxxxxxxxx <
> --
> Cheers, Stuart
> ------------------------------------------------------------------------
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
equinox-dev mailing list

GIF image

GIF image