Showing posts with label Karaf. Show all posts
Showing posts with label Karaf. Show all posts

Friday, January 4, 2013

Fuse Fabric installation options

If you want to play a bit with the Fuse Fabric, you can start the fun by choosing one of the following options:
Although installing Fabric on the vanilla container is very temping, this option doesn't work well in the latest stable Karaf/ServiceMix/Fabric releases. Keep in mind however that, according to the information I've found on the mailing lists, the latest development versions of the Karaf/ServiceMix/Fabric work like a charm.

Since deploying snapshot versions of containers to the production is not an option, at this moment I would recommend to stick to the bundled version of the Fuse Fabric. If you want to use this fine piece of software, you need to migrate your configuration to so called Fabric profiles anyway. With created profiles, migrating from vanilla ServiceMix to Fabric bundle is not a big deal.

Thursday, September 13, 2012

ServiceMix: Autodeployment of the bundle snapshots

You can tell Karaf to scan your local Maven repositories for the latest version of the given bundle.
smx@root> osgi:install mvn:com.example/my-bundle/0.1.0-SNAPSHOT
Bundle ID: 227
smx@root> dev:watch 227
Watched URLs/IDs: 
227
Now whenever you install new version of the bundle to your local snapshot repository, Karaf will fetch the proper jar and deploy it to the ServiceMix.
smx@root> [Watch] Updating watched bundle: my-bundle (0.1.0-SNAPSHOT)
Good thing for fast system tests in the development environment.

PS Thanks to Ɓukasz Dywicki (aka Karaf-PMC-master) for a good comment.

Thursday, August 30, 2012

ServiceMix on the bleeding edge

Why stable dependencies are cool

ServiceMix (and Fuse ESB as well) are supposed to work with a specific version of Camel. For example ServiceMix 4.4.2 comes with a pre-configured Camel 2.8.5 features repository.
karaf@root> features:listurl | grep camel
  true    mvn:org.apache.camel.karaf/apache-camel/2.8.5/xml/features
The same rule is applied to the ActiveMQ and CXF dedicated for every release of the ServiceMix.

This is pretty cool approach since it guarantees you that sticking to the given version of Camel (ActiveMQ, CXF, ...) will result in a stable ServiceMix installation. ServiceMix team invested pretty lots of effort to make sure that Camel in version X works nicely on ServiceMix in version Y. Fuse ESB is tested even more, to guarantee the highest level of the product.


Why stable dependencies are NOT cool

The downside of such stable versioning strategy is that you need to wait a long time before updating to the latest version of Camel (or CXF or whatever).

For example, if I committed Spring Batch component to the Camel and it has been released in Camel 2.10, then I'll need to wait for ServiceMix to use the higher version of Camel and Karaf. In this particular example Karaf 2.2.4 included in the latest stable version of ServiceMix (i.e. 4.4.2) doesn't support Camel 2.10.
karaf@root> features:install camel-spring-batch/2.10.0
Error executing command: Can not resolve feature:
Unsatisfied requirement(s):
---------------------------
   package:(&(package=jline.console.completer)(version>=2.7.0)(!(version>=3.0.0)))
      camel-karaf-commands

Bleeding edge ServiceMix

What to do if you really need to work with the latest version of the ServiceMix stack? Download the latest version of Apache Karaf and manually add Camel (CXF, ActiveMQ, etc) support into it.

For example to use the latest Camel (i.e. 2.10) I can download the latest Karaf (i.e. 2.2.9) and arm it with the Camel 2.10 features repository.
karaf@root> features:addUrl mvn:org.apache.camel.karaf/apache-camel/2.10.0/xml/features
Then I enable feature responsible for bootstrapping Camel modules backed by Spring.
karaf@root> features:install camel-spring
At last but not least I enjoy the brand new Camel modules.
karaf@root> features:install camel-spring-batch/2.10.0
Now I can drop my integration solution using the latest Camel 2.10 into my hand-made bleeding edge ServiceMix. :)