Upgrade Apache Camel in ServiceMix to version 2.3.0

Apache ServiceMix 4.2 includes Apache Camel 2.2.0. The following steps outline how you can add Apache Camel 2.3.0 in the same ServiceMix instance. This example uses the versions as released by Progress Fuse.

Go to the ServiceMix console, either by starting servicemix, or by ssh-ing into ServiceMix. To install Camel 2.3 we need to add a features repository. You can list the currently registered repositories using features:listUrl:

[email protected]> features:listUrl
mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.2.0-fuse-01-00/xml/features
mvn:org.apache.felix.karaf/apache-felix-karaf/1.4.0-fuse-01-00/xml/features
mvn:org.apache.servicemix/apache-servicemix/4.2.0-fuse-01-00/xml/features
mvn:org.apache.camel.karaf/apache-camel/2.2.0-fuse-01-00/xml/features
mvn:org.apache.ode/ode-jbi-karaf/1.3.3-fuse-01-00/xml/features

Add the URL for the Camel 2.3.0 repository:

[email protected]> features:addUrl  
  mvn:org.apache.camel.karaf/apache-camel/2.3.0-fuse-01-00/xml/features

Verify that the repository has been added:

[email protected]> features:listUrl
mvn:org.apache.servicemix.nmr/apache-servicemix-nmr/1.2.0-fuse-01-00/xml/features
mvn:org.apache.felix.karaf/apache-felix-karaf/1.4.0-fuse-01-00/xml/features
mvn:org.apache.camel.karaf/apache-camel/2.3.0-fuse-01-00/xml/features
mvn:org.apache.servicemix/apache-servicemix/4.2.0-fuse-01-00/xml/features
mvn:org.apache.camel.karaf/apache-camel/2.2.0-fuse-01-00/xml/features
mvn:org.apache.ode/ode-jbi-karaf/1.3.3-fuse-01-00/xml/features

Using features:list you can see that new features are now available for installation:

[email protected]> features:list
State         Version                Name                                 Repository
...
[uninstalled] [2.3.0-fuse-01-00    ] camel                                repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-core                           repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-spring-osgi                    repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-test                           repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-cxf                            repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-cache                          repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-castor                         repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-crypto                         repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-dozer                          repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-http                           repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-http4                          repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-mina                           repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-jetty                          repo-0
[uninstalled] [2.3.0-fuse-01-00    ] camel-servlet                        repo-0
...

Install camel using features:install:

[email protected]> features:install camel-core 2.3.0-fuse-01-00

You can verify that the camel osgi bundle has been installed using osgi:list:

[email protected]> osgi:list
START LEVEL 100
   ID   State         Blueprint      Spring    Level  Name
[   0] [Active     ] [            ] [       ] [    0] OSGi System Bundle (3.5.1.R35x_v20090827)
...
[ 180] [Active     ] [            ] [       ] [   60] Apache ServiceMix Specs :: ACTIVATION API 1.4 (1.5.0)
[ 181] [Active     ] [            ] [       ] [   60] Apache ServiceMix Specs :: JAXB API 2.1 (1.5.0)
[ 182] [Active     ] [            ] [       ] [   60] Apache ServiceMix Specs :: STAX API 1.0 (1.5.0)
[ 183] [Active     ] [            ] [       ] [   60] camel-core (2.3.0.fuse-01-00)

The steps outlined above will not work if you need to go through a proxy. One way to fix this is by adding your proxy settings in %SERVICEMIX_HOME%/bin/servicemix.bat:

set JAVA_OPTS=-Dhttp.proxyHost=host -Dhttp.proxyPort=8080 -Dhttp.proxyUser=user -Dhttp.proxyPassword=password -Dhttp.nonProxyHosts=*.local
blog comments powered by Disqus