@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@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@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users