On the basis of learning deeply the pattern matching algorithm of rule engine Drools ,process of reason-ing and conflict resolution strategies , application modes of Drools in J2EE systems are explored . By using IoC of Spring ,loading of rule base in advance is realized .At the same time ,design model is also given .At last ,a test model is designed to evaluate the application mode , which uses Drools rule engine and loads rule base in advance .And this application mode has a good behavior in execution efficiency . By applying Drools to J2EE systems ,separation of business objects and business rules is realized ;the flexibility and ap-plicability of J2EE systems become better and better .%在深入了解Drools规则引擎模式匹配算法、推理过程和冲突解决策略的基础上,探讨了Drools规则引擎在J2EE系统中的应用模式。借助Spring的IoC特性,实现了规则库的预先加载功能,并给出了相应的设计模型。通过设计实例测试了使用Drools规则引擎,并事先加载规则库这种应用模式的执行效率,其在系统运行效率方面表现较好。将Drools应用在J2EE系统中,实现了业务对象和业务规则的分离,增强了J2EE系统的灵活性和适用性。
展开▼