2 Replies Latest reply on Apr 25, 2013 2:19 AM by thomas.diesler

    M1 of the Camel Subsystem available

    thomas.diesler

      I'm happy to announce that the first cut of the Camel subsystem is available at

       

      https://github.com/tdiesler/jboss-as/tree/8.0.0.Alpha1-Camel-M1

      Features

       

      It includes Apache Camel 2.11.0 and comes with support for

       

      • Use core Camel API from any subsystem, module or bundle deployment
      • Preconfigured Camel contexts as part of the subsystem configuration
      • Deployment of a Camel context definition as single XML file
      • Camel context deployment as part of any supported deployment type (i.e. javaee, osgi, etc)
      • Camel contexts available as MSC/OSGi services, so other services can depend on them

       

      For details, have a look at the camel testsuite

      As always, a feature that is not covered is not there ;-)

      How to build

       

      git clone -b 8.0.0.Alpha1-Camel-M1 https://github.com/tdiesler/jboss-as jboss-as-camel
      cd jboss-as-camel
      mvn -Dts.osgi clean install
      ...
      -------------------------------------------------------
       T E S T S
      -------------------------------------------------------
      Running org.jboss.as.test.integration.camel.simple.BeanTransformTestCase
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.687 sec
      Running org.jboss.as.test.integration.camel.simple.SimpleTransformTestCase
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.492 sec
      Running org.jboss.as.test.integration.camel.simple.SpringBeanDeploymentTestCase
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.026 sec
      Running org.jboss.as.test.integration.camel.simple.SpringBeanTransformTestCase
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.981 sec
      Running org.jboss.as.test.integration.camel.simple.SpringContextDeploymentTestCase
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.642 sec
      Running org.jboss.as.test.integration.camel.simple.SpringContextTestCase
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.733 sec
      Running org.jboss.as.test.integration.camel.simple.SystemContextTestCase
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.636 sec
      
      Tests run: 12, Failures: 0, Errors: 0, Skipped: 0
      ...
      [INFO] JBoss Application Server Test Suite: Integration - Camel  SUCCESS [18.547s]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5:35.489s
      [INFO] Finished at: Wed Apr 24 12:29:44 CEST 2013
      [INFO] Final Memory: 210M/425M
      [INFO] ------------------------------------------------------------------------
      

       

      You can start the WildFly Camel Server like this

       

      cd build/target/jboss-as-8.0.0.Alpha1-SNAPSHOT
      bin/standalone.sh -c standalone-camel.xml
      ...
      12:56:25,522 INFO  [org.jboss.camel] (MSC service thread 1-4) JBAS020000: Activating Camel Subsystem
      12:56:25,662 INFO  [org.jboss.osgi.framework] (MSC service thread 1-5) JBOSGI011006: OSGi Framework - 3.0.0.CR21
      12:56:25,952 INFO  [org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011011: Starting bundles for start level: 1
      12:56:25,953 INFO  [org.jboss.osgi.framework] (MSC service thread 1-4) JBOSGI011000: OSGi Framework started
      12:56:25,954 INFO  [org.jboss.camel] (MSC service thread 1-1) JBAS020001: Register camel context: system-context-1
      12:56:25,982 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
      12:56:25,982 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
      12:56:25,983 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 8.0.0.Alpha1-SNAPSHOT "TBD" started in 1625ms
      
      
      
      
      Minimal WildFly Camel Server

       

      Using the WildFly modular build feature we can reduce the size of the Camel WildFly Server by half (i.e. 74MB)

       

      cd build-modular
      mvn -Dmodular=camel clean install
      ...
      build-standalone-server:
          [mkdir] Created dir: /Users/tdiesler/git/jboss-as/build-modular/target/jboss-as-camel-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base
          [copy] Copying 246 files to /Users/tdiesler/git/jboss-as/build-modular/target/jboss-as-camel-8.0.0.Alpha1-SNAPSHOT
          [copy] Copied 45 empty directories to 9 empty directories under /Users/tdiesler/git/jboss-as/build-modular/target/jboss-as-camel-8.0.0.Alpha1-SNAPSHOT
          [copy] Copying 1 file to /Users/tdiesler/git/jboss-as/build-modular/target/jboss-as-camel-8.0.0.Alpha1-SNAPSHOT/standalone/configuration
          [copy] Copying 314 files to /Users/tdiesler/git/jboss-as/build-modular/target/jboss-as-camel-8.0.0.Alpha1-SNAPSHOT/modules/system/layers/base
      
      

       

      The server extensions that are available in the minimal WildFly Camel Server are

       

          <extensions>
              <extension module="org.jboss.as.camel"/>
              <extension module="org.jboss.as.configadmin"/>
              <extension module="org.jboss.as.deployment-scanner"/>
              <extension module="org.jboss.as.jmx"/>
              <extension module="org.jboss.as.logging"/>
              <extension module="org.jboss.as.osgi"/>
          </extensions>
      

       

      Intentionally, this is stripped down to the bare minimum that makes Camel work on WildFly. Future versions of the of the WildFly Camel Server will include addtional subsystems that the Camel subsystem will then integrate with.

       

      Looking forward to your feedback

       

      Cheers

      --thomas