Hi,

Here is the scenario I like to achieve
1. I create a OSGI component/service X that has an annotation A1
2. It has no dependencies or start/active methods
3. 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

Reply via email to