yes https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/Reference.html <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 <[email protected]> wrote: > > 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 at to better understand what that means? >> >> The JavaDoc is actually pretty good! >> https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/ReferencePolicy.html#STATIC >> >> <https://osgi.org/javadoc/r6/cmpn/org/osgi/service/component/annotations/ReferencePolicy.html#STATIC> >> >> >>> Finally, I am using the maven-bundle-plugin with the "_dsannotations" >>> tag to process the declarative services annotations. Is there a better way? >> >> There are different ways, but not necessarily better. The bnd-maven-plugin >> is another choice for generating your OSGi metadata, and it automatically >> picks up the annotations. It’s doing the same thing under the covers (even >> using the same library), just with some slightly better default >> configuration and tooling support. I must admit to being biased though, as I >> actually write some of the plugins in that project. >> >> Regards, >> >> Tim >> >>> On 2 Feb 2017, at 16:30, Dario Amiri <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> 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 wish >>> I could go back to pair programming. >>> >>> 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? >>> >>> Finally, I am using the maven-bundle-plugin with the "_dsannotations" >>> tag to process the declarative services annotations. Is there a better way? >>> >>> Thanks again, >>> >>> D >>> >>> On 02/02/2017 08:10 AM, Timothy Ward wrote: >>>> The next thing to check is, are you using a tool which processes the >>>> Declarative Services annotations when building the bundle? Does the bundle >>>> have a Service-Component header and a matching XML file? I’m guessing that >>>> you probably do as you refer to the reference not being set, but it’s >>>> still worth checking! >>> >> >
