Skip to main content


Showing posts from March, 2015

JBoss Fuse - House Keeping, where to download and what version of JBoss Fuse?

First of all, until today most of my post are done on JBoss Fuse 6.1.x and the version of tool that I am working on is JBoss Developer Studio 7  Where to download JBoss Fuse? Go to  and click on download Until today, 2015/3/31 I am still using 6.1.x for my examples and demos.  Where to download JBoss Developer Studio? Go to , scroll down to download the tested version of JBDS 7.1.1 GA  Until today, 2015/3/31 I am 7.1.1 GA version for my demos and example, I tend to use the supported and GA version for demo, to avoid any problem.  What version of JDK? I use JDK 1.7_xx  What versions of Camel, CXF and A-MQ are you using? Reference Red Hat document :  Getting Started Guide Migration Guide So here is a guide telling you what versions we are actually using with Fuse.  Basically, depend on when I did the demo,  For demo I did with J

JBoss Fuse - Fuse workshop 101 - Part Five

So far we have focused on the routing capability of Fuse, which is the wire and plug that integrate different systems together.And for now let's just put Camel aside for a second and take a look at the container our little Fuse project can run on. And some of the tools that might help you while developing. With JBoss Fuse, you have a number of containers. Standalone Camel process Apache Karaf container JBoss Enterprise Application Server (WildFly) We have been running it as a single Camel process. In this workshop I want to take a look at the the OSGi container inside JBoss Fuse, which comes from the community project Apache Karaf. OSGI break the application into multiple modules so it is easier to manage the dependency between each modules, and this nature allows it to become very lightweight without the need to load unused modules. You can make dependency base on different version. Also OSGi helps you set boundaries between modules, so you can hide packages that you d

JBoss Fuse - Fuse workshop 101 - Part Four

This is probably the easiest part of the entire Camel 101 workshop.  It's very similar with Bean injection in Spring, so with the IoC in mind, in Camel we do the same thing. First we create our POJO, In side each POJO has either your customize and the business logic, which are the most valuable part in the entire system, or just any helper code you would like to use while developing. The reason for this is to keep things easy to maintain and to have a much more light weight framework. As soon as we got the POJO or Java Bean, we are ready to register it into the "Registry". In Camel there are few registry available. Simple JNDI ApplicationContext OSGi  Basically, they are just different place to store your Registry, you can probably guess it by it's name. We use SimpleRegistry mainly in Testing, when you want to use Maps to store your Registry. And obviously JNDI is the default in Camel project. And if you have Spring or OSGi you can always register it t

JBoss Fuse - Fuse workshop 101 - Part Three

It's really difficult to design or architect an Integration project, especially within an Enterprise, there are so many factor to take into considerations. System characteristic Data mapping Interface of systems Risk management Security  And even office politics comes into play, I have to say this is the most time consuming and can quickly become nightmares be not deal carefully.  This quickly became a headache for architects, and people constantly ask for best practice, I have to say, there are no single best practice, because it is not an ONE SIZE FIT ALL answers, integrating system is all about problem solving.  So how do we solve an complex integration problem? YUP! you are right! break it down to smaller problem and then tackle them one by one! And fortunately this book " Enterprise Integration Patterns " by Gregor Hohpe has most of the solutions. This book " provides a consistent vocabulary and visual notation to describe large-scale integrati

JBoss Fuse - Fuse workshop 101 - Part Two

In an ideal world, all software system should use the same protocol, and passing the same type of documents, but sadly, due to time, needs and other reasons that I can't think of, current software systems are full with different types of protocol and formats of data. As a integration developer, we spend a great deal of time just to make two software system understand each other. Fuse workshop 101 part two is all about message transformation. In JBoss Fuse, there are different kind of transformations, So Format or Type and Message content enrichment or reduction are types of transformation that plays around and changes your message body. and Metadata updates mainly modify the header of your messages. An example of Format transformation is from XML to CSV or from CSV to JSON, or simply just flattening out from one XML to another. whereas Type transformation is about changing the Object type to another, such as from java.lang.String to java.lang.Integer. So there are fe

JBoss Fuse - Fuse workshop 101 - Part One

On my way to Hong Kong for a day of workshop on JBoss Fuse, and as I go through my Slide deck, I cannot find any decent easy workshop for beginners. Therefore I decide make a workshop that is easy for Camel first timer to get their hands dirty. The first of part of the workshop is an introduction to Camel, it first goes through what is exactly inside JBoss Fuse. For part one of the workshop, it takes your through the very basic of Camel, one of the very important component inside JBoss Fuse. Every Camel need to have a runtime container to run in, inside camel we call it a CAMEL CONTEXT.  Inside every Camel context, you can define lots of camel route and registry, don't worry about what those are, we will explain later. So inside out blueprint xml, you will see a tag called camelContext. Next up is camel route, they are a chain of command or process defined by you, as a developer. Inside the camel route, there are consumer endpoints that listens to the incoming mess

JBoss Fuse - Easy Load Balancing Web Service with JBoss Fuse

There are few ways to do load balance with web Service, using the Http Gateway is probably the easiest way to do the load balance in Fuse, First we deploy our restful webservice bundle to 2 containers in Fuse, by doing so, we have 2 container running the web service on 2 different container with different IP:Port combination. But, inside your application container, make sure you expose your web service to the fabric. Please see the  tips and trick post  I post before to see how it is done. The reason we are doing this, is to register our web service, in this case a restful webservice, is to let fabric know there is a registered service, and know where they are. Next, we are going to add a http gateway to a container, it will handle all the request dispatching, for load balance, this http gateway will find all the registered service under /servlet and /webapp. Also open up a port for client to connect.  Create a new container, and add Gateway/http profil

JBoss Fuse - Parsing CSV file playing with Websocket in Camel Part two

Continue on from the last post, as in a vegetable wholesalers warehouse, when ever a truck comes in with loads of goods, when the driver signs the goods over, a cvs file contains the product information will be feed into our system via wireless transmission. And then the content of the file needs to go to 2 places simultaneously, first display the content on the monitor for the bider to see instantly, also it needs to store the content inside the system.  We used the Bindy data format converter component in camel to convert CSV into POJO from the previous post.So now to display the content, we are going to continuously print out the arrived goods data to all the connected devices, such as the big monitor in the warehouse or distributor's hand-held device. For this we are going to publish the content to all client( html5 web page ) that are connect to our websocket, and store the content into a constant POJO at the same time.  The WebSocket endpoint is pretty simple and st

JBoss Fuse - Parsing CSV file playing with Websocket in Camel Part one

As I was jogging this morning, I went pass a vegetable warehouse, because it was really early in the morning, I saw the veg distributor were biding for tons and tons of vegetables, they were yelling and shouting. Love the atmosphere, and I saw a monitor that shows all kinds of information about the goods they delivered. So I begin to wonder, can I do this with Camel?  OK, so here is the case, when ever a truck comes in with loads of goods, when the driver signs the goods over, a cvs file contains the product information will be feed into our system via wireless transmission. Because we need to work with these data, our first step is then to covert the individual items in csv file into Java Objects. Since there are multiple items in one csv file, so it's a perfect timing for us to use the splitter pattern in Camel.  After we split each product, we can use the built-in Bindy Data format to convert the single line csv item into a Pojo. For Bindy, it is used for conv