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/ManagedWork...
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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev