| Samples > Rule Execution Server Integration > How to Monitor Events in Rule Execution Server |
How to Monitor Events in Rule Execution Server |
PREVIOUS NEXT |
This sample shows you how to generate notifications for actions performed on property elements in the Rule Execution Server Console. For example, if a user adds or modifies a ruleset property, this could trigger an automatic notification to interested parties.
Key features include:
The sample is installed through the Samples Console.
To install the sample:
executionserver > monitoringevents.
repack command.
deploy command. This compiles the application, repackages the EAR, and deploys it to the application server.
[EARDeployer] Started J2EE application
The sample can only be run through the Samples Console.
To run the sample you need to launch the Rule Execution Server Console, then modify the RuleApp or ruleset properties to generate events.
To run the sample:
deploy.ruleapp target to register the RuleApp.
reset.rss command to reset the RSS data feed on the server.
The sample is located in <InstallDir>/executionserver/samples/monitoringevents.
EventsContextListener.java is a Web context listener, it registers a MBean Server listener and listeners on all existing Rule Execution Server MBeans at startup.
EventsFeedServlet.java generates the RSS feed (the URL to subscribe to the feed is http://localhost:8080/bres/monitoringevents.rss).
RESNotificationListener.java is the listener registered on all RuleApps and Rulesets. It adds an event to the RSS feed each time a RuleApp / Ruleset is modified.
ServerNotificationListener.java is the listener registered on the MBean Server. It adds an event to the RSS feed each time a RuleApp / Ruleset is created or removed.
ServerNotificationFilter.java filters the MBean Server events to send only Rule Execution Server events to the ServerNotificationListener.
Utils.java contains static methods used in the sample.
RSSHelper.java is a helper to generate the RSS feed.
The principle highlight of this sample is Rule Execution Server management JMX notifications.
To rebuild the sample:
deploy target to clean, compile, repack and deploy the sample.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |