Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8046

Use OSGi capabilities to offer components

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 2.14.0
    • Future
    • osgi
    • None
    • Unknown

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: