3 Replies Latest reply on Jul 2, 2009 11:00 PM by njiang

    General Question: OSGi Install -s .vs mvn camel:run

    pchandler

      What's the difference between  "mvn camel:run" and "smx@root:osgi> install -s the.jar"

       

      I am getting different deploy results for each of these methods? What's the difference?

       

      Thanks in advance,

       

      Peter.

        • 1. Re: General Question: OSGi Install -s .vs mvn camel:run
          davsclaus

          mvn camel:run is a maven plugin allowing you to quickly startup a camel context where it loads a spring application context.xml files (scanning the META-INF/services folder).

           

          So its used when you developer and want to run it from a cmd line.

           

          It also allows you to run some of the examples.

           

          Its kinda like what mvn jetty:run does for web apps.

           

          A bit info on the Camel maven plugins here:

          http://camel.apache.org/camel-maven-plugin.html

           

           

           

          The other is installing a .jar into an existing running OSGi kernel.

          • 2. Re: General Question: OSGi Install -s .vs mvn camel:run
            pchandler

            Thanks.

             

            The big difference is that "mvn camel:run" creates a new JVM to run in. Doesn't load into an existing (run instance of) ServiceMix.

             

            Also:I think META-INF/services should be META-INF/spring

             

            So, follow-up question, is there a way to have  "mvn camel:run"  deploy to servicemix instance?

             

            Thanks again,

             

            Peter.

            • 3. Re: General Question: OSGi Install -s .vs mvn camel:run
              njiang

              In Servicemix4 , we leverage the Spring DM to load the application context in the META-INF/spring  of the bundle.

              If you type the command of osgi/start , you can start up the camel routing context in the ServiceMix4. Before that you should install the camel routing context bundle first.

               

              Please feel free to try it