2 Replies Latest reply on Oct 3, 2011 2:18 AM by Claus Ibsen

    Starting Camel and ActiveMQ from spring

    johnwalker Newbie



      I'm having a maven multi-modules project. The modules (layers) in my eclipse project are:


      DAO, Service, Web, persistence, service, webservice, routing, model, amq.


      All are *jars* files, excepting the web module, which is a *war*.


      It's the war file that I aim then to deploy in JBoss. The war files is including all the modules libs above, as well as Camel and AMQ jars.




      *1.* Is adding the following code into the *web.xml* file the right way to link the web module with the routing (camel) and amq (ActiveMQ) modules ? For e.g. doing something like:





          <!-- camel-->


          <!-- amq -- >





      2. How do I start automatically camel and amq from Spring from there ?


      2a. Are they both automatically when Spring start ?


      2b. Or should I add something like below in the config files referenced by the web.xml above ? Something like:








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





      Thank you for your help !