[rules-users] Dynamic updates of stateful sessions

Esteban Aliverti esteban.aliverti at gmail.com
Wed Apr 20 11:05:45 EDT 2011


@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.

@maav: could you please post the output log? When you say "it doesn't work"
are you saying that it fails when the agent tries to apply the change-set
for the first time? Or it fails if you modify the package when the agent is
running?

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, Apr 20, 2011 at 11:08 AM, maav <mattias.avelin at netlight.se> wrote:

> ...I forgot the mention that I've made sure that all files are on the
> classpath. If I go directly for the drl file without using KnowledgeAgent
> and ChangeSet.xml it works.
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Dynamic-updates-of-stateful-sessions-tp2834623p2842915.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110420/31fc7321/attachment.html 


More information about the rules-users mailing list