[rules-users] Stateless Vs Stateful Sessions in Webtier

Pritam infinity2heaven at gmail.com
Tue Jan 19 11:01:23 EST 2010


It isn't clear from the documentation and examples on the recommended usage
of knowledge sessions. From Michael Bali's book, it is highly recommended to
use StatelessKnowledgeSession, since it's threadsafe, but a quick look at
the API shows that it doesn't support many of the features of stateful
ksession.

 -- cannot pass agendaFilter
 -- cannot use agenda-group, activation-group or ruleflow-group in statelss
ksession
 -- It looks like one cannot get Agenda from a statelss ksession and hence
cannot use clear() or setFocus()
 ...

Drools says, for rules itself, "it doesn't matter whether you use stateless
or stateful ksession ..." then why is that an entire set of metadata like
grouping and ordering is ignored?

If statefulknowledge session isn't threadsafe, then what are the best
practices and considerations for making it threadsafe?
-- 
View this message in context: http://n3.nabble.com/Stateless-Vs-Stateful-Sessions-in-Webtier-tp130284p130284.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list