On Wed, Apr 11, 2012 at 9:43 AM, Borut Bolčina <borut.bolc...@gmail.com> wrote: > Thanks for the answers and guidelines Claus. > > I looked into the ServiceMix, but the project seems so abandoned, I decided > not to use it. I read some discussions on the user and dev lists which gave > the impression that ServiceMix has no certain future. Plus, you are bound > to use older versions of Karaf and other frameworks. My goal is also to use > Apache Cellar as I want fail-over architecture for my routes. Also the > documentation for ServiceMix is not very good. >
For SMX I was just referring to other projects that build a project on top of Karaf. Well Karaf was the ServiceMix Kernel, so you can view the SMX project as Karaf + SMX. However more work is shifted towards Karaf, and SMX itself is more about the project branding, providing OSGi bundles, JBI legacy stuff. And then cut a release once in a while. Unfortunately that takes a lot of time as SMX uses many 3rd party projects and they need to be aligned etc. Besides Cellar you may also want to look at Fuse Fabric, as that is also for clustering, fai-over, HA stuff http://fabric.fusesource.org/ https://github.com/fusesource/fuse A new 1.2 release of Fuse Fabric is expected in the near future. Fuse Fabric plays a big role in the new line of Fuse products, which was announced yesterday. http://rajdavies.blogspot.se/2012/04/beta-release-of-fusesource-enteprise.html And for AMQ users it will make their lives much easier when setting up a network of brokers, clusters, HA etc. http://www.nighttale.net/activemq/activemq-in-cloud.html > One thing, is "Preparing Karaf for Camel" at > http://camel.apache.org/karaf.html a necessary step - I mean putting > modified config.properties in Karaf etc folder? > No I updated the docs as newer release of Karaf has a config file out of the box. You only need this if you use CXF and possible if you use camel-jaxb. https://cwiki.apache.org/confluence/display/CAMEL/Karaf > I hope I will find the time today to try running some routes in the Karaf. > Btw instead of using a custom OSGi activator, you can just use a small piece of XML to kick-start Camel. For example a little OSGi blueprint XML file. And then from the XML file refer to your Java Camel route; eg you dont need to use XML routes with Camel. > Thanks, > borut > > Dne 11. april 2012 09:05 je Claus Ibsen <claus.ib...@gmail.com> napisal/-a: > >> On Wed, Apr 11, 2012 at 8:32 AM, Borut Bolčina <borut.bolc...@gmail.com> >> wrote: >> > So instead of >> > >> > <dependency> >> > <groupId>org.apache.camel</groupId> >> > <artifactId>camel-core</artifactId> >> > <version>${camel-version}</version> >> > </dependency> >> > >> > I use camel-core-osgi and use the OsgiDefaultCamelContext instead and I >> > should be safe? >> > >> > public void start(BundleContext context) throws Exception { >> > camelContext = new OsgiDefaultCamelContext(context); >> > ... >> > } >> > >> >> Yeah try that. >> >> > Will this enable me to use Camel commands in Karaf or will I have to use >> > osgi:start command? >> > >> >> You need to install the Camel Karaf commands, they come out of the box >> if you install the camel feature. >> >> In Karaf 2.2.6 onwards its even easier to install Camel as you dont >> have to remember a mvn url, as there is a new chooseurl command. >> The name of that command IMHO could have been better, as now you have >> features:addUrl and features:chooseUrl, and they kinda does the same. >> >> Anyway its something a like: >> >> features:chooseurl camel 2.9.1 >> features:install camel >> >> See details here >> http://camel.apache.org/karaf.html >> >> >> if you use CXF in Karaf then there is a jre properties file you need >> to replace. We put details in the Camel release notes in the bottom >> http://camel.apache.org/camel-290-release.html >> >> The configuration files are in the etc directory. >> >> >> A distribution like Apache ServiceMix got all the pre-setup out of the >> box, as it include CXF, Camel, ActiveMQ, Karaf out of the box. >> With a pure Karaf distribution you may have to tweak it. As Karaf is a >> general purpose container. That can be used to build/brand as other >> products. >> >> >> >> > Thanks, >> > borut >> > >> > >> > Dne 11. april 2012 05:51 je Claus Ibsen <claus.ib...@gmail.com> >> napisal/-a: >> > >> >> Hi >> >> >> >> Yeah that is how this can be done with OSGi APIs. >> >> >> >> You may want to use the camel-core-osgi JAR and use the >> >> OsgiDefaultCamelContext as the CamelContext instance. >> >> That one knows about the OSGi runtime. Otherwise you may run in trouble. >> >> >> >> >> >> On Tue, Apr 10, 2012 at 3:02 PM, Borut Bolčina <borut.bolc...@gmail.com >> > >> >> wrote: >> >> > Hello, >> >> > >> >> > I was wondering if I am going down the right path. My goal is to >> deploy a >> >> > simple Camel route to an OSGI container, but without the Spring >> "startup >> >> > code". >> >> > >> >> > The route: >> >> > >> >> > public class WeatherCurrentRouteBuilder extends RouteBuilder { >> >> > public void configure() { >> >> > ... >> >> > } >> >> > } >> >> > >> >> > and to start and stop the route I implemented: >> >> > >> >> > public class WeatherCurrentBundleActivator implements BundleActivator >> { >> >> > >> >> > CamelContext camelContext; >> >> > >> >> > public void start(BundleContext context) throws Exception { >> >> > camelContext = new DefaultCamelContext(); >> >> > >> >> > PropertiesComponent pc = new PropertiesComponent(); >> >> > pc.setLocation("classpath:weather.properties"); >> >> > camelContext.addComponent("properties", pc); >> >> > >> >> > camelContext.addRoutes(new WeatherCurrentRouteBuilder()); >> >> > >> >> > camelContext.start(); >> >> > >> >> > } >> >> > >> >> > public void stop(BundleContext context) throws Exception { >> >> > camelContext.stop(); >> >> > } >> >> > >> >> > } >> >> > >> >> > I added the maven-bundle-plugin into my pom to build the osgi bundle. >> >> > >> >> > Is this the way to go? >> >> > >> >> > Cheers, >> >> > borut >> >> >> >> >> >> >> >> -- >> >> Claus Ibsen >> >> ----------------- >> >> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com >> >> FuseSource >> >> Email: cib...@fusesource.com >> >> Web: http://fusesource.com >> >> Twitter: davsclaus, fusenews >> >> Blog: http://davsclaus.blogspot.com/ >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> >> >> >> >> >> -- >> Claus Ibsen >> ----------------- >> CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com >> FuseSource >> Email: cib...@fusesource.com >> Web: http://fusesource.com >> Twitter: davsclaus, fusenews >> Blog: http://davsclaus.blogspot.com/ >> Author of Camel in Action: http://www.manning.com/ibsen/ >> -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/