By default, you are allowed to share rulebases, but should never share a session. Also, usage of statics is not always good, specially if you intent to run your application in a JEE environment. It also makes testing more difficult.

   []s
   Edson

2008/11/23 vanshi <nilu.thakur@gmail.com>

I have a ruleEngine class which has one static rulebase and also static
stateful session. The Engine has a static block, that parses drl files and
adds that to package builder and rule base and creates a new stateful
session........all this is done in the static block. So for other classe
that need to access the ruleEngine, there are two ways to access
1) They can get hold of static rule base and create their own session.
2) They can get hold of the centralized stateful session and inserts objects
in that.

Is this idea of having centralized session might create confusion between
different object? Which is better......just to have a static rulebase and
any class that needs functionality of inserting objects/firing rules
.....must create their own session from the rule base OR should the session
be centralized?
--
View this message in context: http://www.nabble.com/Design-question-for-RuleBase-and-session-tp20649168p20649168.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com