[rules-users] Design question for RuleBase and session

Edson Tirelli tirelli at post.com
Sun Nov 23 16:46:07 EST 2008


    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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081123/da0f0b44/attachment.html 


More information about the rules-users mailing list