Customizing the ruleset cache
You can customize the ruleset cache by writing your own implementation class and then modifying the deployment descriptor of the execution unit (XU) accordingly.
Before you begin
About this task
The execution unit (XU) uses a cache of ruleset instances to avoid having to parse rulesets for each execution. Rulesets stay in memory if at least one connection exists in the JCA connection pool of the XU that references that ruleset. Even if the JCA connection is not in use, it references the ruleset until the application server deletes it. When no JCA connection references the ruleset any more, the ruleset can be garbage-collected. This default behavior guarantees that unused rulesets are removed from the memory. If a ruleset is rarely used compared to another ruleset, reparsing might occur.
The ruleset.cache.maintenance.period property is set to 300 by default. This value means that the maintenance thread is run every 5 minutes.
You can write your own implementation of the ruleset cache by packaging a different implementation class in the ra.xml XU configuration file.