[rules-dev] Drools - Spring (IOC) - In progress

Paul Browne paulb at firstpartners.net
Thu Mar 6 03:18:17 EST 2008


Geoffrey,

The answer is 'Yes I want to include the Spring interfaces' and I'm 
going to do it in two parts

Part 1) Is the basic JavaBeans (none of Spring Specific interfaces that 
you mention - yet) that will work for Guice, Seam etc. Very simple stuff 
, mostly it's examples and Docs on how to do *basic* Spring Drools 
integration. This covers (in my opinion) what 60% of people need. This 
part I want to get done ASAP and it gives us a start in the Drools-IOC area.

Part 2) is all the other Spring specific interfaces (such as 
ApplicationContextAware, if the Drools Bean needs to know about 
configuration changes). I have a note in my Part1 docs to show how to 
extend  if you need that stuff *now* . It's not rocket science , but 
people like to see it in black and white :-)  Timescales are a little 
bit longer, and what actually gets included will depend on feedback!

So , my next step is get get Part1 out there (and available in 
Subversion) and that way you'll be able to add your good ideas to the 
code ;-) A Spring configurable Drools Solver perhaps?!

Thanks

Paul






Geoffrey De Smet wrote:
> Have you considered taking advantage of the BeanFactory interface (and 
> probably ApplicationContextAware, InitializingBean and DisposableBean)?
> It's spring specific, but it will make life a lot easier on spring 
> drools users.
>
> As I see it, a drools RuleBase ~ a hibernate EntityManagerFactory, and 
> a drools WorkingMemory ~ a hibernate EntityManager.
> So the RuleBaseBean could implement DisposableBean (and other 
> lifecycle interfaces as needed) so it knows when to destroy the 
> rulebase (if that's needed)?
>
> Seam also does something similar, but only on the working memory:
> http://docs.jboss.com/seam/2.0.1.GA/api/org/jboss/seam/drools/ManagedWorkingMemory.html 
>
> Notice the destroy() method.
>
> With kind regards,
> Geoffrey De Smet
>
> Paul Browne schreef:
>> Folks,
>>
>> Quick update on how the Spring (IOC) - Drools integration is going
>>
>> - About 2/3rds of what I'm doing is Examples and Documentation , the 
>> other third is the Spring (IOC)-Drools adapter themselves.
>> - Calling it IOC rather than Spring as the adapter classes are just 
>> JavaBeans - in theory they should work with Guice and Seam as well.
>> - Only a couple of adapter classes are needed; most functionality is 
>> already in the existing Spring or Drools Frameworks.
>> - Example is based on HelloWorld - preview is up on the wiki - 
>> *http://www.firstpartners.net/kb/index.php/Spring_JBoss_Rules_%28Drools%29_Integration 
>>
>> *- I'll need to provide Spring config / code snippets for Stateless 
>> Sessions,  RuleAgents and deploying as part of Web apps as well
>> - Will refer to Transactions, Spring Proxy etc ; in general this part 
>> will be RTSM (read the spring manual).
>>
>> Anybody has any thoughts?
>>
>> Paul
>>
>> www.firstpartners.net/blog
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>




More information about the rules-dev mailing list