| ILOG JRules User Guide > Deploying Rules > Tasks > Managing RuleApps Using the MBeans Accessor API |
Managing RuleApps Using the MBeans Accessor API |
PREVIOUS NEXT |
This section describes a number of RuleApp management activities that you can carry out using the MBeans Accessor API. JRules provides a server-side API to deploy each entity, and a notification mechanism for model changes.
The MBean accessor API consists of:
IlrJmxMutableModel - use to add a new RuleApp (name and version).
IlrJmxMutableRuleApp - use to add a new ruleset (name and version).
IlrJmxMutableRuleset - use to set the ruleset archive.
To use the JMX MBean:
jrules-bres-manage-tools.jar file in the class path of your application. For example, if you use this API in a Servlet, put the file in the directory META-INF/lib of your Web application.
ruleAppObjectName using the following code:
Using the MBeans Accessor API, you can add a new RuleApp in the Rule Execution Server model and register it on the MBean Server where the model is registered. The model can be registered on another server in a cluster use case.
To add a new RuleApp and register it on the MBean Server:
You can also add a new ruleset with a ruleset archive in the Rule Execution Server model and register it on the MBean Server where the model is registered. The model can be registered on another server in a cluster use case.
To add a new ruleset and register it on the MBean Server:
You can remove a RuleApp from the model and deregister the MBean on the MBean Server where it is registered.
To remove a RuleApp and deregister the MBean on the MBean Server:
To retrieve the ruleAppMBeanName:
ObjectName ruleAppMBeanName = (ObjectName) connection.invoke(bresMBeanName, "getRuleAppObjectName",
new Object[] { ruleAppName, majorVersion + "." + minorVersion },
new String[] { "java.lang.String", "java.lang.String" });
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |