Description
Currently bundles using camel detect components at runtime.
If a component is missing then there are two cases:
- blueprint : The user bundle goes into graceperiod status and waits for the component to come up. In case the component is still missing there is a failure.
- In other cases: Camel will simply display and error about the missing component.
The proper OSGi way to handle camel components would be to use capabilities and requirements.
See
http://wiki.osgi.org/wiki/Provide-Capability
http://wiki.osgi.org/wiki/Require-Capability
So a bundle offering a component should have a capability to express that as well as the user bundle should have a requirement for the capability.
This will even allow a suitable OSGi resolver to auto install bundles that match the required capabilties. In any case it will make sure the required components are installed before the user bundle starts.
So to support this the first decision is how to name the capability.
I propose: "org.apache.camel.component".
Then we have to decide how we name the components. I propose we use the component prefix. E.g "file" for the file component.
The next thing is to add the Provide-Capability headers to the components. This has to be done before the users start creating Require-Capability headers.
To automate this step I propose to create a maven plugin that scans for META-INF/services/org/apache/camel/component/* files and creates suitable headers.