[rules-users] Dynamic updates of stateful sessions

Wolfgang Laun wolfgang.laun at gmail.com
Wed Apr 20 11:36:16 EDT 2011


2011/4/20 Esteban Aliverti <esteban.aliverti at gmail.com>

> @Wolfgang: if you are using drools.agent.newInstance=true (the default
> configuration), then whenever a change-set is applied, either because you
> explicitly force the agent to  do so, or because a monitored resource
> changes, the kbase inside the agent is thrown away an a new kbase is
> created. So you need to get the kbase from the agent and retrieve a fresh
> session from it.
> You can confirm this behavior in this set of tests:
> https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/agent/KnowledgeAgentIncrementalChangeSetTest.java
>
> But, if you are using drools.agent.newInstance=false the internal kbase
> (and each stateful session you got from it) is refreshed when a change-set
> is applied.
>
>
Would you please point me to the doc where it says "and each stateful
session ... is refreshed"?

If true, this were an extremely risky operation. Consider a stateful session
whizzing along and - smack! - rules change right in the middle of a sequence
of firings. Shudder.

-W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110420/247a257c/attachment.html 


More information about the rules-users mailing list