@Wolfgang: if you are using <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(0, 0, 255); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 11px; line-height: 14px; ">drools.agent.newInstance=true </span>(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.<div>
You can confirm this behavior in this set of tests: <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><a href="https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/agent/KnowledgeAgentIncrementalChangeSetTest.java" target="_blank" style="color: rgb(7, 77, 143); ">https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/agent/KnowledgeAgentIncrementalChangeSetTest.java</a> <br>
</span><div>But, if you are using <meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(0, 0, 255); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 11px; line-height: 14px; ">drools.agent.newInstance=false </span>the internal kbase (and each stateful session you got from it) is refreshed when a change-set is applied.<br>
<br></div><div>@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?</div>
<div><br></div><div>Best Regards,</div><div> <br>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX<br><br>Esteban Aliverti<br>- Developer @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com </a><br>- Blog @ <a href="http://ilesteban.wordpress.com" target="_blank">http://ilesteban.wordpress.com</a><br>
<br><br><div class="gmail_quote">On Wed, Apr 20, 2011 at 11:08 AM, maav <span dir="ltr"><<a href="mailto:mattias.avelin@netlight.se">mattias.avelin@netlight.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
...I forgot the mention that I've made sure that all files are on the<br>
classpath. If I go directly for the drl file without using KnowledgeAgent<br>
and ChangeSet.xml it works.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Dynamic-updates-of-stateful-sessions-tp2834623p2842915.html" target="_blank">http://drools.46999.n3.nabble.com/Dynamic-updates-of-stateful-sessions-tp2834623p2842915.html</a><br>
</font><div><div></div><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br></div></div>