English 中文(简体)
Apache Karaf vs. Servicemix
原标题:

Is anyone using Karaf instead of Servicemix? If so, how did you come to this decision? I m aware that Servicemix adds a layer of functionality around Karaf, just curious if Karaf is being used on its own and why...

最佳回答

We re using Karaf for a number of our applications. We were already using Camel (JMS and Esper) for integration between several different platforms (a JBoss 4.2 instance, a Tomcat and several Felix instances) and as this was working well there was little justification in migrating this too (which would have been cause to consider ServiceMix).

The only reason we have some Felix nodes, is that they re limited in use (on client desktops), rarely need/get updated and I wanted the smallest footprint for these nodes. For anything OSGi on the serverside we re using Karaf.

Karaf provides all of the features you d expect and need for a production environment (see the apache-karaf tag s info). We do our development and testing against standard minimal framework (using pax-exam) but deploy to Karaf.

If you don t need an ESB, JCA, BPEL, etc but want a solid, tunable OSGi container, then Karaf on it s own is more than adequate. (And if you found yourself needing a limited subset of ServiceMix s functionality you can always install these in a Karaf instance).

You can also customise the Karaf distribution as part of a maven build - personally I like have the container as part of the application s build, as I can checkout, build and run the entire setup from the command line in minimal time.

Recently there s a clustering subproject of Karaf called Cellar using HazelCast, I not sure if this applies to ServiceMix too.

问题回答

Karaf s life started as the ServiceMix core. Currently, ServiceMix is really a set of bundles that are deployed into a Karaf container. ServiceMix has a number of very handy bundles which do a lot of cool stuff that karaf doesn t. That said, the two primary reason for using ServiceMix is if you want: 1) an ESB, 2) NMR (a feature that allows you to community between bundles AND instances of Karaf).

This all said, the ServiceMix group is currently planning version 5, which will remove the ESB and NMR features and will be focused on being a management container for Camel. In ESB s a great deal of effort when into creating components that could be described using BPL (Business Process Language). However, the folks that wrote ServiceMix began to focus on the implementation of EIP s (Enterprise Integration Patterns) which largely does the same stuff as BPL, but does it in a more standardized and accepted manner. This work was done under the Camel project.

So, in short. If you are using ServiceMix 4+, you re also using Karaf. If you want a more robust integration environment, the environment of choice today (in the Apache/Felix world at least) is Karaf, Camel, and a few bundles from Servicemix.

Here s a little comparative illustration I made. Going from the simplest case (JVM with OSGi functions provided by Apache Felix at the bottom), to more complete/manageable OSGi functions (Apache Karaf in the middle), to enough functions to implement complete ESB instances (Apache ServiceMix at the top) (note that "an ESB" is not a product but a set of endpoints, routers, databases, ETL functions and whatnot configured together in a particular task-specific way).

From Felix to Karaf to ServiceMix

Karaf does NOT come with CXF.

Its pure extracted kernel of ServiceMix. However, you can install CXF on Karaf as below.

karaf:root()> feature:repo:add cxf

Once the feature URL is added we can see the "provided" features by using the following command.

karaf:root()> feature:repo:feature:list | grep cxf

To install cxf fire the command below

karaf:root()> feature:install cxf





相关问题
OSGi - How mature is this technology?

I have a requirement where I need to share some web resources (jsp, html, js, images, css etc.) across different Spring based Struts 2 applications. And seems like OSGi can be used to achieve this? ...

OSGi unit testing without step that packages bundles

I have checked a few testing solution for OSGI including PAX and had a quick look at the abstract TestCase within Spring DM but they both appear to require one to jar up and bundle associated bundles. ...

Is there a way to secure access to bundles in OSGi?

I have an application consisting of several OSGi bundles. I would like to enforce that some of them only provide other bundles access to their services if a valid token (e. g. a license key) has been ...

• 如何限制方案资源+JV/OSGi的权利?

我想建立一个网站,让人们能够解决方案拟定任务,并最终上载解决办法(无论用哪一种证书-语言),以便核实并与其他人分享。

When to use ServiceTracker vs ServiceReference

I am just starting with OSGi programming and have come across two ways to listener for services being activated. The first way, from an EclipseRCP book, uses ServiceReference: String filter="(...

osgi-like framework without the import/export restrictions?

I like OSGi, but the import/export restrictions and the lack of context class loader creates havoc when trying to use 3rd party libraries (e.g., some libraries try to find file.xml in META-INF, ...

热门标签