[rules-users] Synchronizing StatefulSession
ganesh.p
ganesh_patkar at hotmail.com
Tue Sep 30 08:00:28 EDT 2008
Hi,
Consider a scenario where multiple threads continuously assert facts using
StatefulSession.insert() method.
public class RulesManager {
private RuleBase ruleBase;
private StatefulSession session;
public RulesManager() {
ruleBase = RuleBaseFactory.newRuleBase();
session = ruleBase.newStatefulSession();
}
public void fireRules(Object fact) {
session.insert(fact);
session.fireAllRules();
}
}
In this scenario, do we need to synchronize StatefulSession for thread
safety?
--
View this message in context: http://www.nabble.com/Synchronizing-StatefulSession-tp19740667p19740667.html
Sent from the drools - user mailing list archive at Nabble.com.
More information about the rules-users
mailing list