Hi
Am 25.05.2013 um 21:13 schrieb Snorre Lothar von Gohren Edwin:
> Hi, im trying to register a simple DS in my registry. And i inspect the
> service and get a confirmation that its registered. I have also made a
> small project to see how the DS works on the very basics.
>
> But im trying to integrate the DS to my former project using service
> tracker.
> So my question is that if its possible to use this code:
>
> @Reference
> public void setApi(Api api){
> System.out.println("SETTING API");
> this.updateInterface = api;
> }
>
> in a normal activator method? If so I wonder how. I can seem to get te
> reference when im updating the current bundle with this method.
What is a "normal activator method" ?
Basically, a DS service is registered in the service registry and can be
consumed by any functionality accessing the service registry. This includes
normal ServiceTrackers but also Blueprint or, of course, other DS components.
In any case the @Reference annotation (assuming your a referring to the OSGi DS
@Reference annotation) is only usable in @Component annotated components which
are managed through DS. In effect the OSGi DS annotations are converted at
build time to the normal DS descriptor XML files to be included in the bundles.
Hope this helps.
Regards
Felix
>
> My current code is this: https://github.com/Snorlock/prosjektoppgavekode
> The two labelupdaters are my interface and imlpmentation for the DS.
> And i want to take this service into the other bundles, using @Reference.
> Is this possible?
>
> --
> Mvh
> Snorre Lothar von Gohren Edwin
> +47 411 611 94
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]