Monthly Archives: July 2010

Drools Camel Integration

The Apache Camel integration allows us to interact with a Drools Stateless or Stateful session through a pipeline. It basically works by transforming XML commands into executable commands and executing each of them. The advantage of this integration is that Apache Camel makes possible the implementation of more advanced enterprise integration patterns, which is an improvement of Drools Pipeline.

This integration with Drools allows us to add any of the current Camel components. Using the Apache Components you can, receive commands from several entry points and send the execution result to another entry point. Just to name a few of the components: JMS queue/Atom Feed/Mina connection/a Mail/etc. As you can see, this brings a more powerful interoperability mechanism to integrate your application with Drools. Actually Drools is using Camel 2.4.0 that allows a more strong internal integration between them.

Introduction to Drools Grid
This integration is coupled with another drools module called: drools-grid. This module allow us to interact with Drools sessions independent of the JVM location. At the moment we can use two implementations:

  • Local: Used when the drools sessions and clients are in the same JVM
  • Remote: Used when you have drools sessions on a remote JVM. Currently, the only implementation is based on Apache Mina. HornetQ support is actually done, but don’t available in trunk

Drools Grid is embedded inside the Drools Camel component, so don’t worry about further implementation information because this is hidden by Drools. With this information we can start to configure our Camel Context.
Continue reading

Drools Server configuration updated

In the past days Drools Execution Server was updated to use a new version of the Drools Camel integration and more features were added.
One of the biggest differences is that now everything is configured using Spring, and no java code is included inside the WAR file. And, opposite to the previous version, SOAP isn’t supported out-of-the-box (you could use SOAP in the previous version) but you can add your own support right now.

Configuration
As in the previous version, the configuration files are included in the WEB-INF/ folder inside the WAR file. Now we have three configuration files: beans.xml, camel-server.xml and knowledge-services.xml

  • beans.xml: It is the main xml file, but only is used to import the next two files. So, you don’t need to modify this one.
  • camel-server: This file includes the configuration of REST interface and Camel routes.

Let’s go to do a deep configuration review…
Continue reading