When i modified a rule in .drl, modified don't take effect. Is it possible to modified (i.e. hot deploy) a rule (.drl) in drools without restarting the server (tomcat)? How can i resolve this?
A:
Yes it is - there are a few ways - but the first question is how you are loading the rules in the first place - are you loading them from the classpath? or somewhere on disk? There is a KnowledgeAgent (and RuleAgent) class that can load it from a variety of sources, and detect changes and apply them for you automatically when you change a drl file.
Michael Neale
2010-07-13 01:33:23
I create a knowledgeBase with spring and then i create a session and fire rules just when i need to be executed. I think that the problem with KnowledgeAgent is that it's continuesly scanning directories, is it performance? Thanks in advance!
martin
2010-07-14 14:01:58
The scanning shouldn't normally be an issue. one day (java 7?) that can go away as true file notifications are possible.
Michael Neale
2010-07-20 03:36:47