3 Replies Latest reply on Jun 21, 2010 4:09 AM by michael.wengle

    Register a Camel POJO endpoint for other OSGi bundles

    michael.wengle

      I would like to have a route in one OSGi bundle and this route is accessing an endpoint that is provided by another bundle. 'ServiceMix Bean' is doing exactly this for JBI endpoints. Is it possible to do this for non JBI endpoints (without losing the Camel Headers)?

       

      Some details to my question:

      The route could look like this: from("activemq:qwer").to("A").to("B").to("C");

      The endpoint on the other bundle is B;

      The order is important and every endpoint needs the current message that has been changed from the endpoint beforehand.

       

      What I don't want is something like this:

      Bundle 1: from("activemq:qwer").to("A").to("vm:preB");

      Bundle 2: from("vm:preB").to("B").to("preC");

      Bundle 1: from("vm:preC").to("C");

       

      One workaround I already know is this:

      <osgi:reference id="delayService" interface="org.apache.camel.Processor" filter="(processorId=delay)" />

      from("activemq:qwer").to("delayService");

      but I hope there is a neat solution to my problem without accessing OSGi services.