<br>&nbsp;&nbsp;&nbsp; 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. <br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/11/23 vanshi <span dir="ltr">&lt;<a href="mailto:nilu.thakur@gmail.com">nilu.thakur@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I have a ruleEngine class which has one static rulebase and also static<br>
stateful session. The Engine has a static block, that parses drl files and<br>
adds that to package builder and rule base and creates a new stateful<br>
session........all this is done in the static block. So for other classe<br>
that need to access the ruleEngine, there are two ways to access<br>
1) They can get hold of static rule base and create their own session.<br>
2) They can get hold of the centralized stateful session and inserts objects<br>
in that.<br>
<br>
Is this idea of having centralized session might create confusion between<br>
different object? Which is better......just to have a static rulebase and<br>
any class that needs functionality of inserting objects/firing rules<br>
.....must create their own session from the rule base OR should the session<br>
be centralized?<br>
<font color="#888888">--<br>
View this message in context: <a href="http://www.nabble.com/Design-question-for-RuleBase-and-session-tp20649168p20649168.html" target="_blank">http://www.nabble.com/Design-question-for-RuleBase-and-session-tp20649168p20649168.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br> &nbsp;Edson Tirelli<br> &nbsp;JBoss Drools Core Development<br> &nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>