Is it possible to add declarative services using some kind of api?
A little background:
I have a server application based on dynamic scripts (they can be added, edited or removed at any time). Those scripts have dependencies to OSGi services and possibly each other. Whenever a script gets edited, the script gets compiled to javascript, and its dependencies are detected.
At that point, I'd like to (re)register it as a declarative service, so it will be activated / deactivated when its dependencies come and go.
- Is this even possible? Or is there something major I'm missing?
- If it isn't possible with an OSGi standard, is there a specific solution for Felix or Equinox?
- Can you do that in the other frameworks, like iPojo or blueprint?