[rules-users] Can I deploy pre-compiled drools rules as OSGi bundles?

Ansgar Konermann ansgar.konermann at googlemail.com
Fri Jan 7 12:14:58 EST 2011


Hi,

I heard that drools was called "OSGi ready" some time ago. As I am new 
to OSGi, I'd like to hear some opinions on whether the following 
scenario would work for rules deployment:

For the drools part:
- pre-compile all rules into a binary package file
- include these file as a resource into an OSGi bundle
- put a configuration file, say drools-rules.xml into META-INF, 
containing references to all the rule files/resources which should be 
loaded/used

For the OSGi part:
- create an extender bundle which uses the information from the 
configuration file of the above bundle
- automatically de-serializes the rule packages and
- registers a service which offers methods to run the rules contained in 
the rules bundle

The service interface in my case would be project-specific, and would be 
the same for all rule bundles. We have multiple customers, each with 
their own implementation of a ruleset for risk estimation. Each service 
instance could carry a property configured in the 
META-INF/drools-rules.xml file, making it easy for client code to find 
the correct service instance to call.

What I'm particularly interested in:
- does Drools support being used in an OSGi setting as sketched above?
- can anyone estimate whether I will I into class loading issues?


Thanks in advance

Ansgar



More information about the rules-users mailing list