Notification of ruleset updates to the execution unit
You can notify an execution unit (XU) in a local Java™ virtual machine (JVM) cache that a ruleset has been updated and must no longer be used by the cache. You use a management session bean.
To notify an execution unit (XU) running in a local JVM cache that
a ruleset has been updated, you must use the invalidate method
on an instance of the IlrManagementSession session bean
directly. This session bean has the same factory as the Decision Server rule
sessions.
invalidate methods:- The IlrManagementSession#invalidate(ilog.rules.res.model.IlrPath) method notifies the XU that a ruleset path is no longer up to date.
- The IlrManagementSession#invalidate(ilog.rules.res.model.IlrPath[]) method takes an array of ruleset paths. Use this method to invalidate an array of rulesets.
The invalidate methods take
canonical ruleset paths. To retrieve the canonical ruleset path, use
the IlrManagementSession#solveRulesetPath(ilog.rules.res.model.IlrPath) method.
In a Jakarta EE cluster, you can use either the Rule Execution Server console or the res-deploy Ant task to set up notification of a newly deployed ruleset to each XU of the cluster.
In contrast, in Java SE, or if you use the res-write-db and res-write-file Ant tasks, there is no notification of an update sent to the XU. For this reason, an API is provided to notify a local XU of a ruleset update. This API is implemented for Java SE as Java SE rule sessions, and for Jakarta EE as POJO rule sessions. To invalidate a ruleset in Java SE, the rule session API implementation opens a connection to the execution unit (XU).
- If a ruleset is called after it has been updated, the persistence layer is read again and the ruleset is parsed. The reparsing can significantly affect performance. See Ruleset parsing and the ruleset cache.
- This API is not cluster-aware: it notifies only execution units that are deployed on the same virtual machine or server.