Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL
Help

Chapter 4. Using beans with Camel > Using beans the hard way and the easy way - Pg. 94

94 C HAPTER 4 Using beans with Camel expectations of today's businesses. In fact, the simple programming model and light- weight container concept proved superior to the heavyweight and over-complex enterprise application and integration servers that were used before. So what does this have to do with Camel? Well, Camel doesn't mandate using a spe- cific component or programming model. It doesn't mandate a heavy specification that you must learn and understand to be productive. Camel doesn't require you to repackage any of your existing libraries or require you to use the Camel API to fulfill your integration needs. Camel is on the same page as the Spring Framework, with both of them being lightweight containers favoring the POJO programming model. In fact, Camel recognizes the power of the POJO programming model and goes great lengths to work with your beans. By using beans, you fulfill an important goal in the software industry, which is to reduce coupling. Camel not only offers reduced cou- pling with beans, but you get the same loose coupling with Camel routes. For exam- ple, three teams can work simultaneously on their own sets of routes, which can easily be combined into one system. We'll start this chapter by showing you how not to use beans with Camel, which will make it clearer how you should use beans. After that, we'll take a look at the theory behind the Service Activator EIP and dive inside Camel to see how this pattern is implemented. Finally, we'll look at the bean-binding process, which gives you fine- grained control over binding information to the parameters on the invoked method