Automated ruleset management sample details
You use the Samples Console to run this sample.
Running this sample
- Unset for the sample server (direct command in )
- websphere85 forWebSphere® Application Server 8.5 or 8.5.5
- weblogic12 for WebLogic Server 12
- tomcat for Tomcat
To run this sample:
- Double-click the build command to build the sample classes.
- Double-click the run command.
This command does the following operations:
- Creates the connection to the server.
- Retrieves the server information.
- Deploys the samples/jmxremote/data/JmxRuleappSample.jar RuleApp archive on
Rule Execution Server.
The deployed RuleApp archive contains two rulesets that have two properties:
- effectiveDate: the ruleset effective date
- expirationDate: the ruleset expiration date
In the code sample, the method checkStatusDate enables the ruleset status if [effective date] < current date < [expiration date]
- Displays the content of the JmxRuleappSample RuleApp.
- Run the displayruleapp command to display the contents of the RuleApp in the Rule Execution Server console.
Rebuilding this sample
To rebuild this sample:
- Make sure that you are in the Samples Console perspective.
- In the Samples Commands view, go to . Tip: To open the Samples Commands view, click the View sample commands link in the Samples and Tutorials view.
The <APPLICATION_SERVER_NAME> variable is one of the following application servers:
- websphere85 for WebSphere® Application Server 8.5 or 8.5.5
- weblogic12 for WebLogic Server 12
- tomcat for Tomcat
- Run the build command to build the Java™ client classes.
How this sample works
The Rule Execution Server JMX infrastructure provides a standard way to deploy, manage, and monitor the execution resources of the Rule Execution Server. The various MBeans of the Rule Execution Server model are the runtime proxies on each entity of the Rule Execution Server model.
The following features are enabled in the Liberty sample server configuration file, which you can find at <InstallDir>/shared/samplesServer/wlp/server.xml:
- restConnector-2.0
- localConnector-1.0
The following diagram illustrates the infrastructure of the management model.

Source files
You can find this sample in <InstallDir>/executionserver/samples/jmxremote/src/jmxremote.
You can also view and modify the sample source files in Rule Designer.
To import the sample into your workspace:
- Click Import projects in the Samples and Tutorials view, under.
- Switch to the Java perspective.