| Samples > Rule Execution Server Integration > How to Use a Message-Driven Rule Bean |
How to Use a Message-Driven Rule Bean |
PREVIOUS NEXT |
The sample shows how to execute a ruleset on the Rule Execution Server using a point-to-point message-driven rule bean. A message-driven bean (MDB) is an enterprise bean that allows Java EE applications to process messages asynchronously.
The sample simulates a pre-trade check operation between a Java client and the message-driven rule bean.
Key features include:
The sample can only be run through the Samples Console.
To run the sample:
rulemdb > jboss40 sample.
deploy command.
deploy.ruleapp command to register the RuleApp.
The sample is located in <InstallDir>/executionserver/samples/rulemdb.
RemoteBresMdb is the class that invokes the message-driven rule bean.
SimpleJavaClient is the class that executes the pre-trade operation and displays the result for a single order on the command line.
SwingJavaClient is the class that executes the pre-trade operation and displays the results for multiple orders in the Swing mode.
The Swing user interface source files are located in /executionserver/samples/rulemdb/src/rulemdb/ui.
Controller is the class that translates user's interactions into actions to be performed by the model.
CustomerUi is the utility class to set customer input parameters.
LogAppender prints the message logged by log4j in a JTextArea
MdbRenderer is the interface that displays the JMS message.
OrderUi is the class that displays the values of an order field loaded from an XSD file in the SendMessagePanel.
OutputPanel is the class that creates the overall output display panel.
ReceiveMessagePanel is the class that creates the panel that displays the received message-driven rule bean message.
SendMessagePanel is the class that creates the panel that does sends the message-driven rule bean message.
SwingMdbRenderer is the subclass of TextMdbRenderer that displays the message-driven rule bean sample message text.
The following figure shows the execution process.
To rebuild the sample through the Samples Console:
rulemdb/jboss40 sample.
ear command to Build the classes and package the following files:
deploy command to deploy the EAR on the Samples Server.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |