使用 Drools 和 Tomcat 时遇到的问题
当我修改.drl中的规则时,修改不生效。是否可以在 drools 中修改(即热部署)规则(.drl)而无需重新启动服务器(tomcat)?我该如何解决这个问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,有几种方法 - 但第一个问题是你如何加载规则 - 你是从类路径加载它们吗?或者磁盘上的某个地方?有一个 KnowledgeAgent(和 RuleAgent)类可以从各种源加载它,并在您更改 drl 文件时检测更改并自动应用它们。
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.