我们正在将规则从 drools 5.3.0 迁移到 drools 6.1.0 在加载 drools 6 Kibase 配置时出现 permgen space 错误,
我们使用 spring 和 dool 6 集成而不是 KModule.xml 来加载和执行规则
以下是我们正在做的简要说明:
1) 定义了基于 spring 的 Kiebase 配置,有近 200 Kibase
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring- context-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd http://www.springframework.org/schema /oxm http://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd
http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd">
<kie:kmodule id="TEST_KIE_MODULE">
<kie:kbase name="KIE_BASE_1" packages="rules.test1"/>
<kie:kbase name="KIE_BASE_2" packages="rules.test2"/>
.
.
.
.
<kie:kbase name="KIE_BASE_200" packages="rules.test2"/>
<bean id="kiePostProcessor" class="org.kie.spring.KModuleBeanFactoryPostProcessor">
<constructor-arg name="configFileURL" value=""></constructor-arg>
<constructor-arg name="configFilePath" value="../TestApp/src/main/resources"></constructor-arg>
</bean>
2)当示例 20 的 KB 数量较少时,它在 512 permgen 空间下运行良好。因为我们在加载规则时添加了更多 KibeBase 配置开始永久空间问题。
3)这是我们正在做的简要说明:
1)我们首先编译整个 KB 配置(应用程序启动)并存储在 tocache 中。2)在执行规则时,我们会根据某些输入参数获得合格的 KB 并从该 KB 触发所有规则。3)每个 KB 我们平均有 50-60 条规则。4)在第 1 步中,我们遇到了 perm gen space 的问题 512 。
您的帮助将在此得到应用。相同的配置适用于 drool 5.3.0,但在 drools 6.1.0 中出现问题