Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » multiple versions of one bundle
multiple versions of one bundle [message #62672] Mon, 27 February 2006 17:08 Go to next message
Eclipse UserFriend
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 #62696 is a reply to message #62672] Mon, 27 February 2006 21:33 Go to previous messageGo to next message
Harald Niesche is currently offline Harald NiescheFriend
Messages: 23
Registered: July 2009
Junior Member
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 #62720 is a reply to message #62696] Tue, 28 February 2006 07:56 Go to previous messageGo to next message
Eclipse UserFriend
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 #62743 is a reply to message #62720] Tue, 28 February 2006 13:35 Go to previous messageGo to next message
Jeremy Volkman is currently offline Jeremy VolkmanFriend
Messages: 14
Registered: July 2009
Junior Member
Chris Schaefer wrote:

> the important thing would be, can there be different concurrent bundles
> activated at the same time within one jvm ?

Yes. This is detailed in the OSGi specification.

Jeremy Volkman
Re: multiple versions of one bundle [message #62765 is a reply to message #62672] Wed, 01 March 2006 00:27 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:How do I determine the contributing bundle for a given extension
Next Topic:Eclipse 3.2 M4 or M5 + Webstart -> Impossible !
Goto Forum:
  


Current Time: Sun Dec 22 06:07:27 GMT 2024

Powered by FUDForum. Page generated in 0.04300 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top