Hi Frank, Can you please clarify the meaning of point 3.
“Based on the value of A1”… but this is an annotation on a class so is there any possibility for it to change during runtime? It seems that whatever the value of A1 is at compile time will determine forever whether that component is active or inactive. That can’t be what you mean though, so could you please elaborate a little further what you had in mind? Regards, Neil > On 5 May 2015, at 10:03, Frank Langel <fr...@frankjlangel.com> wrote: > > Hi, > > Here is the scenario I like to achieve > I create a OSGI component/service X that has an annotation A1 > It has no dependencies or start/active methods > Based on the value of A1, I like this service to be available or marked as > STATE_UNSATISFIED when starting up > How can I do this? > ServiceTracker is not the answer I think. It doesn’t provide the ability to > access the component context that would allow me to disable the service > again, plus I think its not a good idea as there might be dependencies to be > managed > I don’t want to add the logic in the activate method bc I want to apply it to > all components with the annotation > Introspection in Activator : I could not use the component model directly, > but search my bundle for all classes with this annotation, and start the > service myself > I cannot use service listener, as ServiceEvent does not expose an possibly to > interfere when registering the service > Are service hocks the answer ? > Thanks a lot in advance > Frank > > > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev