Setting up the Automated ruleset management sample
You must use the Rule Execution Server console to install this sample.
Procedure
To install this sample:
- Start the Rule Execution Server console:
The procedure is different depending on whether you work with the sample server or with another supported application server.
- If you work with the sample server:
- Switch to the Samples Console perspective.
- Start the sample server from the Sample Server view.
- After the server is started, click the Rule Execution Server Console link in the Operational Decision Manager Sample Server view.
The Rule Execution Server console opens on http://localhost:<PORT>/res
- If you work with WebLogic Server,
the server.user and server.password properties
that are defined in the build.properties file
must be a WebLogic Server user
defined in the WebLogic Server environment:Under environment/servers/<your_domain_AdminServer_instance>/protocols/IIOP:
- Enable IIOP
- Enter the IIOP username you defined
- Enter the IIOP password you defined
- Confirm the IIOP password you defined
The Rule Execution Server console opens on http://localhost:7001/res
- If you work with the Tomcat 7.0 application server, you must
enable a remote JMX listener (see JMX Remote Lifecycle Listener). Do the following
steps:
- Stop the Tomcat application server.
- Download the JMX remote JAR file from Tomcat 7 Downloads and place it in <InstallDir>/CATALINA_HOME/lib.
- In <InstallDir>/CATALINA_HOME/conf/server.xml,
add the following code:
The sample Java code uses the port number 8999.< Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener" rmiRegistryPortPlatform="8999" rmiServerPortPlatform="10002" />
- Add the following line to <InstallDir>/CATALINA_HOME/bin/catalina.sh:
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
- Optional: If you use Windows, add the following line to <InstallDir>/CATALINA_HOME/bin/catalina.bat:
CATALINA_OPTS=%CATALINA_OPTS% -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
- Follow the instructions in the next section, for other supported application servers.
- If you work with other supported application servers:
- Before you run this code sample, deploy Rule Execution Server on your application server. See Configuring.
- After Rule Execution Server is
deployed, open a web browser and enter one of the following URLs to
open the Rule Execution Server console
login page for your application server:
- WebSphere® Application Server 8.x: http://localhost:9080/res
- Tomcat: http://localhost:8080/res
- If you work with the sample server:
- Log in to the Rule Execution Server console.
- User name: resAdmin
- Password: resAdmin
- Click the Explorer tab to display the list of RuleApp archives that are deployed on the Rule Execution Server console.
- Before you build the sample in the next step, if you are
using the WebLogic Server,
configure the sample property files as follows: <InstallDir>/executionserver/samples/jmxremote/weblogic<version_number>/build.properties
- WL_HOME=${env.WL_HOME}
- By default, the variable is set to your WL_HOME environment variable.
- server.url=t3://localhost:7001
- Specifies the URL where the Rule Execution Server console is deployed.
- server.user=resAdmin
- Sets the user login.
- server.password=resAdmin
- Sets the user password.
- Build the Java™ client
classes in Rule
Designer by
switching to the Samples Console perspective. Tip: To open the Samples Commands view, you can click the View sample commands link in the Samples and Tutorials view.
- In the Samples Commands view, go to Samples Commands > Rule Execution Server > Automated ruleset management > application_server.
- Double-click the build command to run it.
Parent topic: Sample: Automated ruleset management