The set of OSGi bundles dependencies can be used here:

We test against spring:

This is our project that builds osgi-bundles and does some testing of Drools against OSGi:

I have done some minimal OSGi docs. OSGI is stil la work in progress for us and we have only osgi-ified some aspects Drools, although we have done extensive work on the classloaders to make it fit better.

Please do test what we have, maybe help us OSGi-ify other aspects of drools.

On 04/08/2010 10:25, David Conde wrote:

I'm trying to get drools-core and drools-compiler 5.1 running on spring dm-server. Does anyone have the minimal list of OSGi bundles as maven dependencies handy?


On 25 June 2010 13:59, mmarmol <> wrote:

Hi, I have managed to install Drools-core and Drools-compiler in my Equinox
osgi environment, I can compile rules and execute them just fine, I was just
wandering how to configure a KnowledgeAgent using
KnowledgeBuilderFactoryService and KnowledgeBaseFactoryService. I managed to
configure one but i am not able to reload rules when they change at runtime.
I have started ResourceChangeScannerService and
ResourceChangeNotifierService, changeset related to the rules file gets read
but no change gets implemented. An idea?

Here is the code:


               ServiceReference serviceRef = bc
               ServiceRegistry registry = (ServiceRegistry) bc.getService(serviceRef);

               KnowledgeBuilderFactoryService knowledgeBuilderFactoryService = registry

               KnowledgeBaseFactoryService knowledgeBaseFactoryService = registry
               ResourceFactoryService resourceFactoryService = registry

               KnowledgeBuilderConfiguration kbConf = knowledgeBuilderFactoryService
                               .newKnowledgeBuilderConfiguration(null, getClass()

               KnowledgeBuilder kbuilder = knowledgeBuilderFactoryService
               ResourceFactoryService resource = resourceFactoryService;

               if (kbuilder.hasErrors()) {
                       throw new RuntimeException(kbuilder.getErrors().toString());

               KnowledgeBaseConfiguration kbaseConf = knowledgeBaseFactoryService
                               .newKnowledgeBaseConfiguration(null, getClass()

               KnowledgeBase kbase = knowledgeBaseFactoryService

               KnowledgeAgentConfiguration aconf =
               aconf.setProperty("drools.agent.scanDirectories", "true");
               aconf.setProperty("drools.agent.scanResources", "true");
               aconf.setProperty("drools.agent.newInstance", "false");

               kagent = KnowledgeAgentFactory.newKnowledgeAgent( "CoreDroolsAgent",kbase,

Thanks in advance!

View this message in context:
Sent from the Drools - User mailing list archive at
rules-users mailing list

_______________________________________________ rules-users mailing list