felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@adobe.com>
Subject Re: Research questions
Date Wed, 29 May 2013 14:14:45 GMT
Hi,

Am 29.05.2013 um 12:09 schrieb Snorre Lothar von Gohren Edwin:

> Hi
> 
> This is not related to the other mail I have sent, but I have some
> questions that I seak answeres to.
> I wondered if someone here might be kind enough to either answere or point
> me in the right direction for me to seek some answeres to these?
> 
> RQ1 How can OSGi bundles be mapped to active objects?

Bundles are like Java libraries with a life cycle and active objects, well, they are the active
objects created by various means when the bundle has been started and thus is active.

In general an "active object" cannot be related to a bundle (other than checking for its class
loader, but you don't want to get there, really). If the "active object" is registered as
a service, you can get the registering bundle  from the ServiceReference.getBundle() method.

> 
> RQ2 How can the life cycle of OSGi bundles and services integrated
> consistently with state full behaviour of active objects (i.e., components
> with their own process)? This includes for instance starting, binding,
> stopping, and also updating the code for bundles or active objects,
> respectively.

That's handled by the OSGi framework, the extenders (such as Declarative Services or Blueprint)
and/or the correct use of BundleActivators. In the case of extenders, the services and components
are managed by the extender following the bundle lifecycle.

If you don't use an extender and thus manage the services through a BundleActivator, you have
to "clean" up yourselves as part of the BundleActivator.stop method.

> 
> RQ5 Are there any patterns for communication of events and states? I know
> the whiteboard pattern exists.

That's it ;-)

Maybe stepping on your toe: Have you considered reading one of the great books on OSGi out
there in the wild ? One dealing a lot with Declarative Services (their sample is implemented
with DS) is "OSGi and Equinox: Creating highly modular Java systems" by Jeff McAffer. Another
one is Richard Hall's e.a. book "OSGi in Action". See also the (small) book list on http://felix.apache.org/documentation.html

Regards
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message