Hello.
I'm loading a big amount of rules during starting of JBoss (20000
rules). All rules (in string format) are available before JBoss startup
- they are stored into database. Rules are loaded one by one and it
takes about 90 minutes. I want to speed up this process. Is there
something like "bulk load" for inserting rules into knowledge base or
another smart way to fast loading a big amount of rules?
I'm using:
1) Drools 5.1
2) JBoss 4.2.3
My source code looks like this:
String rule = ...
Resource resource = ResourceFactory.newReaderResource(new
StringReader(rule));
KnowledgeBuilder knowledgeBuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
knowledgeBuilder.add(resource, ResourceType.DRL);
knowledgeBase.addKnowledgePackages(knowledgeBuilder.getKnowledgePackages());
Regards,
Piotr