2011/4/20 Esteban Aliverti <esteban.aliverti(a)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...
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