KieModule configurations (KieBases, KieSessions & StatelessKieSessions)
The
kmodule.xml
file is used to customize the KieModule configurations. In this file, we can define how the rules are grouped together in different KieBases that can be loaded for different purposes. It also allows us to define more fine-grained configurations for the rule engine instance that will be created.
In this section, we will cover the basic configurations for KieBases, KieSessions, and StatelessKieSessions. In the end, we will also review a mechanism that we can use to include other KieBases from other KieModules in our KieModule.
Let's start simple with the kmodule.xml
file defined in the chapter-03-classpath-tests/src/test/resources/META-INF/
directory, as follows:
<?xml version="1.0" encoding="UTF-8"?> <kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/kie/6.0.0/kmodule"> <kbase name="rules...