Passing objects from the application to the rulesets

It is important to understand the relationship between the XOM class loaders of the ruleset.

Consider the following scenario:
  • The application creates an instance a of a class A.
  • The application passes a to the master ruleset.
  • The master ruleset has rules that use a or passes a to the child ruleset.
  • The child ruleset has rules that use a.

The following figure shows the default relationship between the XOM class loaders of the rulesets:

Default relationship between the XOM class loaders of the rulesets

By default, the following conditions apply:
  • The parent class loader of the managed XOM of the master and child rulesets is the application class loader.
  • The classes are taken in priority from the parent class loader.
The consequence is that the rules can use the instance a because the used class A is in the same class loader (which is the application loader).