Re: Cannot inject blueprint exposed service with annotations

2017-02-02 Thread David Jencks
yes https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/Reference.html david jencks > On Feb 2, 2017, at 2:45 PM, Dario Amiri wrote: > > The javadoc is

Re: Cannot inject blueprint exposed service with annotations

2017-02-02 Thread Dario Amiri
The javadoc is unclear about where to use it. Is this a setting on the Reference annotation itself? On 02/02/2017 09:46 AM, Timothy Ward wrote: I did not understand your comment on "Declarative Services with a static policy". I'm ignorant of this concept. Is there some documentation I can look

Re: DS components not Active

2017-02-02 Thread Alex Soto
I see how I confused you, I am sorry. I have been simplifying the description of the problem to make it easier to understand. The reality is that yes, both the Blueprint context and the component depend on the same PID. The output I provided earlier does not show it, because this component

Re: DS components not Active

2017-02-02 Thread David Jencks
I think the problem is in blueprint somewhere. I’m a bit confused since you seem to be saying there is only one pid but the DS component uses “org.MyServiceImpl" and the blueprint container uses (IIUC, which I may not) “business”. david jencks > On Feb 2, 2017, at 1:13 PM, Alex Soto

Re: DS components not Active

2017-02-02 Thread David Jencks
IMO it’s unlikely to be a problem in the DS framework. Why is a change in a configuration making a blueprint container restart? I’d expect the damping proxies to leave the same blueprint component instance in place. david jencks > On Feb 2, 2017, at 12:04 PM, Alex Soto

Re: DS components not Active

2017-02-02 Thread Alex Soto
Yes, the component did not have the immediate=true, and I have an annotated activate method, but I don’t have a deactivated method. The fact that the scr:info shows a name for this method caught my attention, since the modified method is instead shown as a dash (-). This was just me looking

Re: DS components not Active

2017-02-02 Thread David Jencks
I’m not sure exactly what the scr:components command is supposed to show, but everything looks consistent and fine based on my guesses about what it is doing. Did you have a specific question? Note that DS components are by default delayed, which means that if they expose a service they

Re: DS components not Active

2017-02-02 Thread Christian Schneider
Hi Alex, I suppose these components do not have immediate=true and are not used by any other component. This is just the normal lazy loading. Without the immediate flag a DS component is only activated if its service is used. Christian 2017-02-02 20:04 GMT+01:00 Alex Soto

DS components not Active

2017-02-02 Thread Alex Soto
Hello, I am using Karaf 4.0.8. Some DS components in my application do not show as ACTIVE in the output from the scr:components command, but show a blank state. I do no see any difference between the other DS components that are shown as ACTIVE, and the ones that show blank State.

Re: Cannot inject blueprint exposed service with annotations

2017-02-02 Thread Timothy Ward
> I did not understand your comment on "Declarative Services with a static > policy". I'm ignorant of this concept. Is there some documentation I can > look at to better understand what that means? The JavaDoc is actually pretty good!

Re: Cannot inject blueprint exposed service with annotations

2017-02-02 Thread Dario Amiri
Thank you Timothy. It was the @Reference on the unbind that was creating the problem. I don't know why I didn't catch that especially since I have another @Reference right next to that one where I did not make the same mistake. I guess there's no substitute for a second pair of eyes - makes me

Cannot inject blueprint exposed service with annotations

2017-02-02 Thread Dario Amiri
Hello all, I'm hoping you can help me with an issue that is baffling me. In one bundle I'm exposing a service through blueprint In another bundle I'm trying to inject that service with annotations @Reference(unbind = "unsetData") public void setData(final Data data) {