Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Extension-Registry as OSGi Services
Extension-Registry as OSGi Services [message #97453] Fri, 14 September 2007 15:04 Go to next message
Eclipse UserFriend
Originally posted by: matthias.spam.de

Hi

I'm using the Extension-Registry as an OSGi-Service. Somehow I can't
import the package org.eclipse.core.runtime in my manifest.mf. Only if I
require the bundle org.eclipse.equinox.registry it works. If I try to
import the package Eclipse tells me it can't see it.

Since I want to use some OSGi-Best Practices and not depend on an
particular bundle I would like to use the Import-Package deklaration.

Any ideas?

Matt
Re: Extension-Registry as OSGi Services [message #97476 is a reply to message #97453] Fri, 14 September 2007 15:33 Go to previous messageGo to next message
Danail Nachev is currently offline Danail NachevFriend
Messages: 36
Registered: July 2009
Member
Hi, Matthias

If you don't have org.eclipse.core.runtime bundle, you won't be able to
import org.eclipse.core.runtime package. Although it is exported by
org.eclipse.equinox.registry bundle, it has a mandatory attribute
attached to the export:

org.eclipse.core.runtime; registry="split"; mandatory:="registry"

If you want to import it, you need the following syntax:

org.eclipse.core.runtime; registry="split"

Reference:
[1] OSGi Core Specification, c.3.6 Constraint Solving

Danail

Matthias wrote:
> Hi
>
> I'm using the Extension-Registry as an OSGi-Service. Somehow I can't
> import the package org.eclipse.core.runtime in my manifest.mf. Only if I
> require the bundle org.eclipse.equinox.registry it works. If I try to
> import the package Eclipse tells me it can't see it.
>
> Since I want to use some OSGi-Best Practices and not depend on an
> particular bundle I would like to use the Import-Package deklaration.
>
> Any ideas?
>
> Matt
Re: Extension-Registry as OSGi Services [message #97491 is a reply to message #97476] Fri, 14 September 2007 20:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matthias.spam.de

OK as far as I understand the docs:
The bundle org.eclipse.equinox.registry exports the package as follows:
org.eclipse.core.runtime; registry="split"; mandatory:="registry"
Which tells me there is an mandatory attribute that any importer has to
set. This mandatory attribute is called registry and has to be set to
"split".
Wow.
@Danail THANKS.

Now this is the technical resolution. But why did the registry bundle
choose to set these attributes? And what are the consequences for me?

Matt

Danail Nachev schrieb:
> Hi, Matthias
>
> If you don't have org.eclipse.core.runtime bundle, you won't be able to
> import org.eclipse.core.runtime package. Although it is exported by
> org.eclipse.equinox.registry bundle, it has a mandatory attribute
> attached to the export:
>
> org.eclipse.core.runtime; registry="split"; mandatory:="registry"
>
> If you want to import it, you need the following syntax:
>
> org.eclipse.core.runtime; registry="split"
>
> Reference:
> [1] OSGi Core Specification, c.3.6 Constraint Solving
>
> Danail
>
> Matthias wrote:
>> Hi
>>
>> I'm using the Extension-Registry as an OSGi-Service. Somehow I can't
>> import the package org.eclipse.core.runtime in my manifest.mf. Only if I
>> require the bundle org.eclipse.equinox.registry it works. If I try to
>> import the package Eclipse tells me it can't see it.
>>
>> Since I want to use some OSGi-Best Practices and not depend on an
>> particular bundle I would like to use the Import-Package deklaration.
>>
>> Any ideas?
>>
>> Matt
Re: Extension-Registry as OSGi Services [message #97505 is a reply to message #97491] Sat, 15 September 2007 06:58 Go to previous message
Danail Nachev is currently offline Danail NachevFriend
Messages: 36
Registered: July 2009
Member
The registry bundle exports org.eclipse.core.runtime package in this
special way, because it is not the only exporter of the package. The
package is so called "split package" [1] and thus, in order to get all
of the package contents, there must be a package exporter, which
consolidate all of the package parts. In order to be sure that importer
of org.eclipse.core.runtime without any attributes, all of the parts
must be added special requirements for their importing. Otherwise, it
cannot be guaranteed which package will be wired.

Danail

[1] OSGi Core Specification 4.1, c.3.13 Requiring Bundles

Matthias wrote:
> OK as far as I understand the docs:
> The bundle org.eclipse.equinox.registry exports the package as follows:
> org.eclipse.core.runtime; registry="split"; mandatory:="registry"
> Which tells me there is an mandatory attribute that any importer has to
> set. This mandatory attribute is called registry and has to be set to
> "split".
> Wow.
> @Danail THANKS.
>
> Now this is the technical resolution. But why did the registry bundle
> choose to set these attributes? And what are the consequences for me?
>
> Matt
>
> Danail Nachev schrieb:
>> Hi, Matthias
>>
>> If you don't have org.eclipse.core.runtime bundle, you won't be able to
>> import org.eclipse.core.runtime package. Although it is exported by
>> org.eclipse.equinox.registry bundle, it has a mandatory attribute
>> attached to the export:
>>
>> org.eclipse.core.runtime; registry="split"; mandatory:="registry"
>>
>> If you want to import it, you need the following syntax:
>>
>> org.eclipse.core.runtime; registry="split"
>>
>> Reference:
>> [1] OSGi Core Specification, c.3.6 Constraint Solving
>>
>> Danail
>>
>> Matthias wrote:
>>> Hi
>>>
>>> I'm using the Extension-Registry as an OSGi-Service. Somehow I can't
>>> import the package org.eclipse.core.runtime in my manifest.mf. Only if I
>>> require the bundle org.eclipse.equinox.registry it works. If I try to
>>> import the package Eclipse tells me it can't see it.
>>>
>>> Since I want to use some OSGi-Best Practices and not depend on an
>>> particular bundle I would like to use the Import-Package deklaration.
>>>
>>> Any ideas?
>>>
>>> Matt
Previous Topic:Xerces vs. JRE XML parsers
Next Topic:Jetty Configuration
Goto Forum:
  


Current Time: Wed Sep 25 10:31:30 GMT 2024

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

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

Back to the top