[rules-users] CommandFactory.newSetGlobal and scope

Ricardo J. Méndez mendezster at gmail.com
Thu Aug 26 08:30:47 EDT 2010


Hi everyone,

I'm reading through Michael Bali's Drools JBoss Rules book as well as the
reference guide, and I've got a question of scope about
StatefulKnowledgeSessions.

I understand that if I call setGlobal on a stateful session, this global
value will be shared for all simultaneous calls to executeRules across all
threads.  I'm looking into CommandFactory, which has a newSetGlobal
method.   From what I gather, a global set via CommandFactory.newSetGlobal
and then executed with a call to
execute(CommandFactory.newBatchExecution(cmds)) would be scoped solely to
that execution, regardless of it is a StatefulKnowledgeSession and there are
other parallel command executions against the same session.

Can anyone confirm if that is accurate?

Thanks in advance,

-- 
Ricardo J. Méndez
http://www.arquetipos.co.cr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100826/d694c41b/attachment.html 


More information about the rules-users mailing list