List Info

Thread: Drools - Spring (IOC) - In progress




Drools - Spring (IOC) - In progress
user name
2008-03-05 11:12:58
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

Re: Drools - Spring (IOC) - In progress
country flaguser name
Belgium
2008-03-06 01:16:36
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/sea
m/2.0.1.GA/api/org/jboss/seam/drools/ManagedWorkingMemory.ht
ml
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.ne
t/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-devlists.jboss.org
> ht
tps://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-devlists.jboss.org
ht
tps://lists.jboss.org/mailman/listinfo/rules-dev

Re: Drools - Spring (IOC) - In progress
user name
2008-03-06 02:18:17
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/sea
m/2.0.1.GA/api/org/jboss/seam/drools/ManagedWorkingMemory.ht
ml 
>
> 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.ne
t/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-devlists.jboss.org
>> ht
tps://lists.jboss.org/mailman/listinfo/rules-dev
>
> _______________________________________________
> rules-dev mailing list
> rules-devlists.jboss.org
> ht
tps://lists.jboss.org/mailman/listinfo/rules-dev
>

_______________________________________________
rules-dev mailing list
rules-devlists.jboss.org
ht
tps://lists.jboss.org/mailman/listinfo/rules-dev

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )