multiple versions of one bundle [message #62672] |
Mon, 27 February 2006 17:08 |
Eclipse User |
|
|
|
Originally posted by: chs.tipas.at
our application has multiple ui-plugins which requires some basic plugins.
for this basic plugins multiple versions are requrired, due to the different
dependencies from ui-plugins to different versions of the base plugins.
does the equinox platform stable support multiple versions of plugins to be
installed and activated within the same jvm ?
thanks!
chris
|
|
|
|
Re: multiple versions of one bundle [message #62720 is a reply to message #62696] |
Tue, 28 February 2006 07:56 |
Eclipse User |
|
|
|
Originally posted by: chs.tipas.at
yes of course the ui plugins will search the dependencies with version aware
settings.
the important thing would be, can there be different concurrent bundles
activated at the same time within one jvm ?
"Harald Niesche" <harald@brokenerror.de> schrieb im Newsbeitrag
news:dtvr7r$3jb$1@utils.eclipse.org...
> Chris Schaefer wrote:
>> our application has multiple ui-plugins which requires some basic
>> plugins.
>> for this basic plugins multiple versions are requrired, due to the
>> different
>> dependencies from ui-plugins to different versions of the base plugins.
>>
>> does the equinox platform stable support multiple versions of plugins to
>> be
>> installed and activated within the same jvm ?
>
> Yes, it will support that. It's actually a feature required by the OSGi
> spec.
>
> You should set this up so that the ui-plugins require specific version
> ranges of the packages they import and the base plugins export the
> packages with versions in those ranges. Equinox will sort out which
> package lives where and wire the bundles together. Make sure that the
> import range has an upper limit, because the plugins are wired to the
> export with the highest compatible version. If you don't specify an
> upper limit, all versions higher than the version mentioned are
> considered matching.
>
> Harald
|
|
|
|
Re: multiple versions of one bundle [message #62765 is a reply to message #62672] |
Wed, 01 March 2006 00:27 |
Eclipse User |
|
|
|
Originally posted by: alex_blewitt.yahoo.com
As several people have noted yes, this does work (even in the same VM). Each bundle gets its own classloader, so two bundles can load the same named bundle but a different version.
However, make sure that you put both a lower and upper vesion on the bundle dependency, otherwise it will take the highest one available. For example, if you were using Xerces 2.5 in one and Xerces 2.6 in another, you'd have to have:
Requires-Bundle: org.apache.xerces;bundle-version="[2.5.0,2.6.0)"
and
Requires-Bundle: org.apache.xerces;bundle-version="[2.6.0,2.7.0)"
in each of the two plugins. Without it, both would just jump to the highest version of Xerces 2.6 installed at the time. (The [ syntax means 'from' and the ) syntax means 'up to but not including' in laymans terms. In mathematical terms they are an open range and a closed range ;-)
Alex.
PS Eclipse doesn't come with an org.apache.xerces bundle but you can substitute your own example in place of xerces.
|
|
|
Re: multiple versions of one bundle [message #62849 is a reply to message #62765] |
Wed, 01 March 2006 11:01 |
Eclipse User |
|
|
|
Originally posted by: chs.tipas.at
thanks for tthis information!
the example is already under test now. i will post some feedback if we find
any open limitations or bugs.
thanks.
chris
"Alex Blewitt" <alex_blewitt@yahoo.com> schrieb im Newsbeitrag
news:23800214.1141172911145.JavaMail.root@cp1.javalobby.org...
> As several people have noted yes, this does work (even in the same VM).
> Each bundle gets its own classloader, so two bundles can load the same
> named bundle but a different version.
>
> However, make sure that you put both a lower and upper vesion on the
> bundle dependency, otherwise it will take the highest one available. For
> example, if you were using Xerces 2.5 in one and Xerces 2.6 in another,
> you'd have to have:
>
> Requires-Bundle: org.apache.xerces;bundle-version="[2.5.0,2.6.0)"
>
> and
>
> Requires-Bundle: org.apache.xerces;bundle-version="[2.6.0,2.7.0)"
>
> in each of the two plugins. Without it, both would just jump to the
> highest version of Xerces 2.6 installed at the time. (The [ syntax means
> 'from' and the ) syntax means 'up to but not including' in laymans terms.
> In mathematical terms they are an open range and a closed range ;-)
>
> Alex.
>
> PS Eclipse doesn't come with an org.apache.xerces bundle but you can
> substitute your own example in place of xerces.
|
|
|
Powered by
FUDForum. Page generated in 0.03471 seconds