OSGi & DS questions [message #88770] |
Mon, 28 May 2007 10:11  |
Eclipse User |
|
|
|
Originally posted by: tonyhsu.tw.ibm.com
Hi I have couple questions about OSGi and DS. Could someone help to
clarify? Thanks.
Question about QSGi
I try to figure out how OSGi provides the framework for registering a
service and consuming it dynamically. In OSGi presentation, it mentions
CLDC is possible if class loaders are added in a device specific way. If
it's not a problem, how to implement a simple framework which can register
a simple (or light) service and consume it? Could someone provide
guidances?
Question about Declarative Services
from this article
http://www.eclipsezone.com/articles/extensions-vs-services/
<article>To support lazy registration, Declarative Services has the notion of
delayed services. When the SCR registers a delayed service, it creates a
proxy object to act as a placeholder, and registers that in the service
registry. From the point of view of a consumer, the service is now available
for use, however the bundle containing the real service implementation has not
been started yet. Then when a consumer tries to actually use the service, the
SCR detects this, and asks the OSGi runtime to fully load and activate the
bundle. It then subtitutes the proxy for the real service.</article>
According to the article, Declarative Service supports lazy registration,
but I look into the code org.eclipse.equinox.ds, it seems when someone
calls newInstance in ComponentFactory (i.e. ComponentFactoryImpl), it will
call to cd.getBundleContext().registerService to registry the service
eventually. It looks like when the service is registered, it has found the
real service and loaded it. How does it achieve the lazy registration? Or
I misunderstand the code?
Tony
|
|
|
Re: OSGi & DS questions [message #89973 is a reply to message #88770] |
Thu, 07 June 2007 12:10  |
Eclipse User |
|
|
|
Originally posted by: viy.net.gmail.com
Tony Hsu wrote:
> Question about Declarative Services
> from this article
> http://www.eclipsezone.com/articles/extensions-vs-services/
Big thanks for the link to article. It was very helpful for me.
> <article>To support lazy registration, Declarative Services has the
> notion of �delayed� services. When the SCR registers a delayed service,
> it creates a proxy object to act as a placeholder, and registers that in
> the service registry. From the point of view of a consumer, the service
> is now available for use, however the bundle containing the real service
> implementation has not been started yet. Then when a consumer tries to
> actually use the service, the SCR detects this, and asks the OSGi
> runtime to fully load and activate the bundle. It then subtitutes the
> proxy for the real service.</article>
>
> According to the article, Declarative Service supports lazy
> registration, but I look into the code org.eclipse.equinox.ds, it seems
> when someone calls newInstance in ComponentFactory (i.e.
> ComponentFactoryImpl), it will call to
> cd.getBundleContext().registerService to registry the service
> eventually. It looks like when the service is registered, it has found
> the real service and loaded it. How does it achieve the lazy
> registration? Or I misunderstand the code?
As I understand from the article "delayed" (lazy) services isn't
completely implemented yet. See quote:
<quote>
Unfortunately this is not quite the case yet. The “delayed” services
feature requires some small tweaks to the basic Equinox runtime, and
these tweaks have not been implemented yet in the released version 3.2.
They do not appear at all yet (at the time of writing) in the other open
source OSGi runtimes, Apache Felix and Knopflerfish. They do appear in
the latest milestone releases of Equinox 3.3, but you may feel it is
risky to use a milestone release in a production application.</quote>
|
|
|
Powered by
FUDForum. Page generated in 0.05161 seconds