|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02537 seconds