MBeans accessor API

To manage RuleApps, you can use the MBeans accessor API. Decision Server provides both a default implementation and a specific implementation for WebSphere® Application Server.

Specific naming conventions apply for each application server.

Introduction

The Rule Execution Server model provides references to all Rule Execution Server entities and defines the relationships between them. Decision Server provides a server-side API to deploy each entity and a notification mechanism for model changes.

To simplify access to the MBeans, the Decision Server API provides the following set of classes in the ilog.rules.res.model.mbean Java™ package.

Inheritance diagram for the MBeans accessor API down from the ilog.rules.res.model.mbean package

By using these classes, you can manipulate the management model without having to write proprietary code to access the MBean server where the MBeans are registered. These classes give access to all methods of the public MBean interfaces of the Rule Execution Server model.

By using the JMX remote URL, you can take the following actions:
  • Add, remove, and list all registered RuleApps
  • Add, remove, and list all rulesets of a RuleApp
  • Update the XOM and properties of a ruleset

For example, with a JSR 160 implementation, the URL is service:jmx:rmi:///jndi/rmi://localhost:1181/server

The ObjectName of an MBean is an identifier that is used at registration time by the MBean server. This identifier uses a special format that is defined in the JMX 1.0 specification. By using such identifiers, you can send a query to the registered MBeans. To write queries, use wildcard characters and regular expressions.

The JMX MBeans of an application server are open to management actions, but the JMX code to access the MBeans can be proprietary. In a clustered environment, the JMX code to retrieve the MBeans is more complex.

Default implementation

The default implementation is used when the management model does not detect a specific implementation for the environment in which it is running.

The following table uses these conventions to identify the variable part of the ObjectName instances:
${ruleApp_name}

For the name of the entity.

${ruleApp_version}

For the version of the entity.

${computed_value}

For a value that is computed from the other parameters when the MBean is registered.

Table 1. Default implementation
Type ObjectName
IlrResModel RES:type=IlrResModel
IlrResRuleset
RES:Version=${version}, 
Name=${name}, 
RelatedRuleAppName=${ruleApp_name}, 
RelatedRuleAppVersion=${ruleApp_version}, 
type=IlrResRuleset
IlrResRuleApp
RES:Version=${version},
Name=${name},type=IlrResRuleApp

WebSphere Application Server implementation

ObjectName instances for WebSphere Application Server are different from the default implementation because the Rule Execution Server MBeans extend the runtime MBeans of WebSphere Application Server. The deployment manager can read each MBean and the ObjectName instance is computed by the helper class that does the registration. The computed ObjectName instance (process, node, and cell attributes) manages the cluster topology.

Table 2. WebSphere Application Server implementation
Type ObjectName
IlrResModel
WebSphere:cell=${computed_value}, mbeanIdentifier=${computed_value}, name=IlrResModel, node=${computed_value}, process=${computed_value}, type=IlrResModel 
IlrResRuleset
WebSphere:cell=${computed_value}, Version=${version}, Name=${name}, mbeanIdentifier=${computed_value}, name=${computed_value}, node=${computed_value}, process=${computed_value}, type=IlrResRuleApp
IlrResRuleApp
WebSphere:cell=${computed_value},  Version=${version},  Name=${name},  RelatedRuleAppName=${ruleApp_name},  RelatedRuleAppVersion=${ruleApp_version},  mbeanIdentifier=${computed_value},  name=${computed_value},  node=${computed_value},  process=${computed_value},  type=IlrResRuleApp