If I use the KnowledgeAgent with the 'drools.agent.newInstance' property set to 
'false' to automatically reload my KnowledgeBase when resources in the 
changeset are updated, what happens to any existing sessions when the agent 
detects changes and reloads the KnowledgeBase?  Do they continue to use the old 
rules or are they somehow reloaded in midstream?  What adverse effects might I 
see?

I ask because I'm trying to rework some existing classes that were written to 
facilitate the loading and caching of KnowledgeBases created in different ways 
- e.g. loading decision tables, loading .drl and .rf files in the traditional 
manner, loading .drl and .rf files using an agent.  I'd like to be able to grab 
a KnowledgeBase from the cache regardless of how it was created, create a 
session from it, and fire all of the rules, but I'm concerned about cached 
KnowledgeBases created by KnowledgeAgents.  If I set the newInstance property 
to 'true', my cached KnowledgeBase will never see the updates.  If I set it to 
'false', my cached KnowledgeBase should see the changes, but I'm concerned 
about the behavior in any currently running sessions.

FYI - the classes were originally written using the Drools 4.07 RulesAgent for 
caching RuleBases that needed to be automatically reloaded.  It seems to be 
working as expected.  I'm trying to update those classes to use Drools 5.1 
classes instead.

Thanks,
Jamie

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to