Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Other OSGi questions
Other OSGi questions [message #23338] Mon, 21 April 2003 19:08 Go to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
Hello,

Here some extra questions about OSGi:

- What happens if a bundle is leaving and the service it provides are not
unregistered?
It seems to me that the framework automatically "unregister" it, isn't
it?

- Bundle A is active and imports package foo, Bundle B exports package foo.
So A uses instances from B.
1st question - What happens if a Bundle C is being installed and exports
foo?
2nd question - What happens if B is being updated?

Thank you

PaScaL
Re: Other OSGi questions [message #23426 is a reply to message #23338] Thu, 24 April 2003 18:10 Go to previous messageGo to next message
Keith Kimball is currently offline Keith KimballFriend
Messages: 22
Registered: July 2009
Junior Member
Pascal,

Based on my reading of the OSGi Release 3 Spec


>> What happens if a bundle is leaving and the service it provides are not
>> unregistered? It seems to me that the framework automatically
"unregister" it,
>> isn't it?

Section 4.8.7 (Stopping Bundles). The framework must automatically
unregister
all register services when the bundle is stopped.

>> Bundle A is active and imports package foo, Bundle B exports package
foo.
>> So A uses instances from B.
>> 1st question - What happens if a Bundle C is being installed and
exports foo?

Section 4.4 (The Bundle name-space). It's my understanding that if a
package is
exported by multiple bundles, the framework selects the package from one
of the
bundles. There's verbage pointing out than an "export" is an implicit
"import"
and even though a bundle exports a package, it may use a different
(potentially
lower version) of that package. Note also, packages can be used from a
bundle
without the bundle being activated.

>> 2nd question - What happens if B is being updated?

Section 4.8.9 (Updating Bundles). If an updated bundle had exported any
packages
that are used by other bundles, those packages may not be updated; their
old
versions remain exported until the xxx.refreshPackages method has been
called
or the Framework is restarted.
Re: Other OSGi questions [message #23638 is a reply to message #23338] Sat, 26 April 2003 14:27 Go to previous message
Eclipse UserFriend
Originally posted by: Peter.Kriens.aQute.se

Pascal Rapicault wrote:

> - What happens if a bundle is leaving and the service it provides are not
> unregistered?
> It seems to me that the framework automatically "unregister" it, isn't
> it?

Yes. After the bundle's stop() method is called, the framework
automatically unregisters any remaining services.


> - Bundle A is active and imports package foo, Bundle B exports package foo.
> So A uses instances from B.
> 1st question - What happens if a Bundle C is being installed and exports
> foo?

The framework already has an import for foo so it will not do anything.


> 2nd question - What happens if B is being updated?

After update - nothing is changed. But normally after one or more
updates, refreshPackages() is called and this will resolve all
dependencies again. Depending on versions, C might be choosen or B
again. (Bundles that depend on this package, like A, will be restarted
in that case).

Kind regards,

Peter Kriens


>
> Thank you
>
> PaScaL
>
>
>
Previous Topic:How do you handle library classes via dependencies?
Next Topic:Equinox and the next Eclipse
Goto Forum:
  


Current Time: Sat Dec 21 12:10:32 GMT 2024

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

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

Back to the top