Friday 17 October 2014

A Fun Camel Ride With Apache Camel Part Two The Required Bits And Pieces To Start

Onto the various bits and pieces you will need to finish this tutorial. Based on the previous post we will need a database server, a tag analyser library and finally an IDE that we can develop the route in. We will also need some additional software once we start  to introduce the more advanced features of Apache Camel, however I will leave those for later.

So keeping with the open-source nature of Apache Camel I will use the following pieces of software to run this demo.

  • MySQL server.
  • The Eclipse IDE with the JBoss Fuse Tooling plug-in (Thank you RedHat).
  • JAudioTagger library(Will be downloaded later as a Maven dependency).
  • Maven
  • Apache Karaf


Since there is enough material on the internet to cover the installation and setup of MySQL, Maven and Apache Camel I wont be touching on those subjects here. For the IDE there are a couple of versions of eclipse you can go for, however I went for the Kepler release and followed the instructions found in this excellent blog by Lars Heinemann.

If you try any other versions your mileage might vary so it might be advisable to stick with these instructions to get this tutorial working. In short you will need to download and install the Kepler release of Eclipse. I would also suggest that you have Maven working before progressing to the next step.

Onto adding the JBoss Fuse tooling plugin via the usual method of installing Eclipse add-ons/plug-ins (hint: Help menu -> install new software). Just out of interest FuseESB or JBossFuse is a ESB product that uses Apache Camel as the backbone of the architecture and is thus one of the easiest ways to work with Apache Camel. 

After installing the JBoss Fuse tooling plug in and restarting eclipse you can now start a new camel project by going to the file menu and selecting the New->Other option(or by pressing CRTL+N). You should now see a fuse tooling folder and by expanding that you will see a option called Fuse Project. See the screen shot below:

Starting a new fuse project.
On the next screen you will be asked which work space to use. I just stuck with the defaults here. On the next screen you will be presented with a New Fuse Project selection screen. There are a lot of various options you can choose here as to what maven archetype you want to use. 

Since this tutorial will be using Apache Karaf for deployment and Apache Karaf is a OSGI runtime we will need to choose a simple OSGI archetype. The archetype that will create the needed OSGI setup is named: camel-archetype-blueprint. Select that and fill out the rest of the details as seen in the screenshot below.

Select the archetype

Now click on the finish button and wait a moment for the project to be setup. The next step is just adding the Fuse Integration perspective to the project. Click on the add perspective button and select the fuse integration perspective as shown in screen shot below:

Select fuse integration perspective

At this point you will have a new project that is ready to start working with. In the next section of the tutorial I will show you how to navigate around the project and where the various important pieces are.


No comments:

Post a Comment