Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » A DS service is available as soon as the host bundle is RESOLVED?
A DS service is available as soon as the host bundle is RESOLVED? [message #83366] Thu, 15 February 2007 18:40 Go to next message
Eclipse UserFriend
Hi all,

one question about a create article I read
(http://www.eclipsezone.com/articles/extensions-vs-services/)

Is demand loading of a DS Service allready supported when the host
bundle is RESOLVED? I tried this by a simple example based on OSGi two
bundles. But the client bundle could only get a service reference from
his bundle context when the host bundle is ACTIVE.
Also I declared [Eclipse-LazyStart: true] within the host bundle
manifest. But still the service was first available after host bundle
ACTIV status.

I thought this behavior is depend on bundle lazy loading that will come
with OSGi 4.1 (http://wiki.eclipse.org/index.php/Lazy_Start_Bundles)

Thanks for help.

Best Greetings
Alexander
Re: A DS service is available as soon as the host bundle is RESOLVED? [message #83510 is a reply to message #83366] Mon, 19 February 2007 11:20 Go to previous message
Eclipse UserFriend
Originally posted by: 9simmend.informatik.uni-hamburg.de

Alexander Ziegler schrieb:
> Hi all,
>
> one question about a create article I read
> (http://www.eclipsezone.com/articles/extensions-vs-services/)
>
> Is demand loading of a DS Service allready supported when the host
> bundle is RESOLVED? I tried this by a simple example based on OSGi two
> bundles. But the client bundle could only get a service reference from
> his bundle context when the host bundle is ACTIVE.
> Also I declared [Eclipse-LazyStart: true] within the host bundle
> manifest. But still the service was first available after host bundle
> ACTIV status.
>
> I thought this behavior is depend on bundle lazy loading that will come
> with OSGi 4.1 (http://wiki.eclipse.org/index.php/Lazy_Start_Bundles)
>
> Thanks for help.
>
> Best Greetings
> Alexander
There are a lot of ways you can implement on demand loading. For better
understanding a ServiceComponent is loaded lazy in that way the he gets
activated when your client tries to retrieve the service. Before that it
is only a proxy that he sees in the registry.

This is all pure OSGI and you dont have to specify any eclipse specific
header in the manifest.

Is your host bundle registering its service in its activator class ?
because if thats true it gets activated and registered when the bundle
gets activ. But that is no DS service. Lazy activation of services is
only possible if you do it with the SCR.

So get the Service Compendium from the OSGI site and read the DS chapter
its all in it.

greets Felix
Previous Topic:Rationale for using Equinox
Next Topic:Multiple Dependencies - serviceChanged
Goto Forum:
  


Current Time: Fri Apr 26 09:49:36 GMT 2024

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

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

Back to the top