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 a1 of a class A.
  • The application passes a1 to the main ruleset.
  • The main ruleset has rules that use a1 or passes a1 to the child ruleset.
  • The child ruleset has rules that use a1.
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 main 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 a1 because the used class A is in the same class loader (which is the application loader).