[rules-dev] Drools + Spring

Steven Williams stevearoonie at gmail.com
Thu Apr 2 19:43:30 EDT 2009


Here's what I do:

We inject KnowledgeBases into our app using Spring. It was a simple matter
of just implementing a builder class that takes a bunch of drools Resources
and adding a build() method to create the KnowledgeBase and then creating a
class that implements Spring FactoryBean and InitializingBean to construct
the builder and convert Spring resources to Drools ones and calling the
builder.build() method in the afterPropertiesSet().

There is one currently open bug in drools that means we have to cast to a
class from the old api to add accumulate functions.

cheers
Steve


2009/4/3 Abu Rasheed <aburasheed at studentmasjid.com>

> Are there any plans to have Spring support in drools-api? The last mail
> that I saw in searching the topic is dated last year, and there are no new
> postings related to this.
>
> Does anyone have any success in injecting KnowledgeBase into their apps
> using Spring? Is there any examples out there that I can refer to?
>
> Thanks
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20090403/0562b5cc/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KnowledgeBaseBuilder.java
Type: text/x-java
Size: 4500 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20090403/0562b5cc/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KnowledgeBaseFactoryBean.java
Type: text/x-java
Size: 1979 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20090403/0562b5cc/attachment-0001.bin 


More information about the rules-dev mailing list