Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Beginning with OSGi
Beginning with OSGi [message #53389] Wed, 16 November 2005 03:40 Go to next message
Eclipse UserFriend
Originally posted by: ts.conceicao.uol.com.br

Hi,

I plan to build an application using OSGi and was looking for an
implementation to work with, then I heard of equinox and decided to try it
out.

I've started reading the R4 spec but I have one question still that
was not entirely clear to me: while developing a bundle for running on
OSGi, do I need to implement the Bundle interface in some kind of "main
class"?

If we develop Bundles on OSGi and there's a Bundle interface the logic
led me to think that it should, but this tutorial doesn't show that:

http://oscar-osgi.sourceforge.net/tutorial/ex2.html

Thiago
Re: Beginning with OSGi [message #53442 is a reply to message #53389] Wed, 16 November 2005 10:37 Go to previous message
Didier Villevalois is currently offline Didier VillevaloisFriend
Messages: 86
Registered: July 2009
Member
Hi Thiago,

Thiago Silva Conceição wrote:
> I've started reading the R4 spec but I have one question still that
> was not entirely clear to me: while developing a bundle for running on
> OSGi, do I need to implement the Bundle interface in some kind of "main
> class"?

No you don't have to! The Bundle interface is implemented by the
framework to represent your bundle for others in the application.

All you have to do is implement BundleActivator. There you will be given
a BundleContext instance which gives you access to private callbacks for
the implementation of your bundle.

Bundles that need to know things about other bundles then will see the
Bundle objects for each bundles in the system and not their
BundleContext objects.

> If we develop Bundles on OSGi and there's a Bundle interface the logic
> led me to think that it should, but this tutorial doesn't show that:
>
> http://oscar-osgi.sourceforge.net/tutorial/ex2.html
>
> Thiago

This tutorial is completely right!

Didier.
Previous Topic:With 3.2M3, CANNOT export and import the same package
Next Topic:Server-side incubator
Goto Forum:
  


Current Time: Thu Apr 25 07:06:41 GMT 2024

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

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

Back to the top