Yes, David is correct. What I do in my Job is create a pool of WorkingMemories from the same RuleBase (we use StatefullSession) in order to increase the time of response.
The Rulebase is thread safe, but individual sessions are not, regardless if it is a stateless or stateful. So your first suggestion, creating a new session for each call is correct.
2009/6/4 Meny Kobel <meny.kobel@gmail.com>
_______________________________________________Hi,
I have a number of services(threads) sharing the same RuleBase instance.
Each service is calling execute method and waiting for the results.
should each service call StatelessSession session = ruleBase.newStatelessSession() Or I can create one StatelessSession and share it between the services (probably will improve performance)?
Meny
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users