0 Replies Latest reply on Nov 13, 2015 11:52 AM by Michele Mazzilli

    Camel Context doesn't work with osgi service/reference

    Michele Mazzilli Newbie

      Hi everyone,


      I'd like to organize my project like this example:


      FuseByExample/smx-bootstraps · GitHub


      So, I created my demo project following it.




      Parent pom where i defined dependecyManagement


      Where I defined my spring/camel-context.xml in this way

      <bean id="helloBean" class="org.demo.service.HelloBean">

            <property name="say" value="Hi from Camel"/>


      <service id="HelloServiceExporter" interface="org.demo.service.Hello" ref="helloBean"/>


           Where i defined my spring/camel-context.xml

                       <osgi:reference id="helloServiceReference" interface="org.demo.service.Hello"  bean-name="helloBean" />

                      <camelContext id="DemoBootstrapTest" xmlns="http://camel.apache.org/schema/spring">


            <from uri="timer:foo?period=5000"/>


                <method ref="helloServiceReference" method="hello"/>


            <log message="The message contains bye!"/>




           Where i defined my feature.xml


      When I install my feature, Camel context doesn't work. No camel context is created.

      need i other dependencies?


      Environment: JBoss Fuse 6.2 - Java 1.8 - Camel version 2.15.1.redhat-620133.


      Thanks in advance.


      Kind greeting