Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KieScanner behavior for already existing KieBases and KieSessions
With reference to Drools-usage Google group discussion Ref. https://groups.google.com/d/topic/drools-usage/XpFlRNjuc9c/discussion Report below summary for reference. I think statement is missing to describe what happens to already existing KieSession and KieBase; from the current description I would have assumed only "new" stuff gets up-to-date, but (fortunately!) also some type of already-existing KieSession and KieBase gets automatically updated. Current behavior "From this moment on" proved by code actually is: 1- already existing KieBase, generated with getKieBase() : it does get automatically updated. This is the use case of named KieBase or default KieBase referenced from kmodule.xml 2- already existing KieBase, generated with newKieBase() : NOT automatically updated. This is the use case of KieBase created with "custom" KieBaseConfiguration settings and NOT referencing kmodule.xml 3- any KieBase generated after the KieScanner updated, with either getKieBase() or newKieBase() : directly the newer version, simple case, indeed as already mentioned in the documentation. Behavior for already existing KieSession depends on the underlying KieBase, so it make reference to the cases described here-above. To be fully explicit, when already existing KieSession was generated directly from KieContainer.newKieSession() is case #1 because it implies the default KieBase from kmodule.xml.
- Loading branch information