Task 1: Deploying the Loan Validation Application
|
PREVIOUS
NEXT
|
In this task, you deploy the loan validation Enterprise Archive (EAR), import the loan validation rule project in Rule Studio, create a RuleApp project in Rule Studio and deploy the loan validation RuleApp to Rule Execution Server.
Step 1: Deploying the Loan Validation Application
The loan validation Enterprise Archive (EAR) files can be found in the resdebugging tutorial task1/<applicationserver> directories. How you deploy the EAR file depends on which application server you are using. Here, we describe a number of options. We suggest that you refer to your application server documentation for a more detailed description.
To deploy the EAR file if you are using JBoss installed with JRules:
-
Start the JBoss server:
On Windows, click
Start >
All Programs >
ILOG >
ILOG JRules version >
Web Interfaces >
Start JBoss server.
On UNIX, use the
startserver executable in the
<InstallDir>/shared/bin directory.
Wait for the JBoss Server to be started.
-
In a command prompt type:
cd <InstallDir>/executionserver/tutorials/resdebugging/task1/jboss40
-
Then type:
This Ant target deploys the loan validation application to the JBoss server installed with JRules.
If you are using a JBoss server not installed with JRules, you paste the file into your deployment directory.
To deploy the EAR file for a JBoss server not installed with JRules:
-
Copy the
loan-validation-JBOSS40.ear file provided in the task1/jboss40 directory.
-
Paste the file into:
<JBOSS_HOME>/server/default/deploy.
| Note |
You can reconstruct the EAR file by running the build.xml script in the application server directories under task1.For example, to compile and deploy the EAR on JBoss type the following in a command prompt:
-
cd <InstallDir>/executionserver/tutorials/resdebugging/task1/jboss40
-
ant jboss40.ear deploy
|
You can also deploy the EAR on application servers other than JBoss.
To deploy the EAR file on Sun AS 82:
-
Open the file:
<SUN_AS_82_InstallDir>\Sun\AppServer82\domains\domain1\config\server.policy
-
Add the following permission:
grant codeBase "file:${com.sun.aas.instanceRoot}${/}applications${/}j2ee-apps${/}loan-validation-sunas82${/}-" {permission java.io.SerializablePermission "enableSubclassImplementation";};
-
Start the application server.
-
Open Application Server > Resources > Connectors > Connector Connection Pools > XUPool and make sure that Transaction Support is set to
No Transaction.
-
Select deploy a new application and choose the loan validation EAR file specific to the application server in:
<InstallDir>/executionserver/tutorials/resdebugging/task1
If you want to deploy the EAR file on WebLogic, WebSphere, or Oracle 10g, the procedure is the same in each case.
To deploy the EAR file on WebLogic, WebSphere, or Oracle 10g:
-
Start the application server.
-
Login to the application server administration console.
-
Select deploy a new application and choose the loan validation EAR file specific to the application server under
<InstallDir>/executionserver/tutorials/resdebugging/task1.
Step 2: Importing the Loan Validation Rule Project
The loan validation rule project is imported in Rule Studio. You need to be in the Rule perspective.
To import the rule project:
-
On the Start menu, click All Programs > ILOG > ILOG JRules version > ILOG Rule Studio for Java to open Rule Studio.
-
Check that you are in the Rule perspective.
Rule perspective is the default setting. If you are in the Rule perspective, the Rule icon is highlighted in the top-right corner of the Rule Studio window. If this is not the case, on the
Window menu, click
Open Perspective > Other. Then, in the Open Perspective dialog, select
Rule and click
OK.
-
On the File menu, click Import.
-
In the Import wizard, under the General category, select Existing Project into Workspace, then click Next.
-
On the Import Projects page, click Browse next to the Select root directory field.
-
In the Browse for Folder dialog, select the directory:
<InstallDir>/executionserver/tutorials/resdebugging/task1/studioproject
-
Return to the Import Projects page and make sure the projects
loanvalidation-rules and loanvalidation-xom are selected in the Projects area. Click Finish.
The two projects appear in the Rule Explorer.
Step 3: Creating a RuleApp Project in Rule Studio
In this step, you create a RuleApp project in Rule Studio.
To create a RuleApp project:
-
On the File menu, click New > Project.
-
Select RuleApp Project in the wizard, and then click Next.
-
Enter
loanvalidation as the name of the project, and then click Next.
-
On the Add Ruleset Archives page, on the Rule Projects tab, click Add.
-
In the Ruleset Archives dialog, select the
loanvalidation-rules rule project.
-
Make sure the option Use all rules contained in the project is selected, then click OK.
-
Back into the Add Ruleset Archives page, you see the rule project
loanvalidation-rules is added to the list. This means that rulesets extracted from this rule project are part of the RuleApp.
-
Click Finish.
The RuleApp project is created and appears in the list of projects. The RuleApp Editor opens and displays RuleApp information.
Step 4: Deploying the Loan Validation RuleApp to Rule Execution Server
The loan validation RuleApp is deployed using the Rule Studio deploy wizard.
To deploy the RuleApp:
-
In the RuleApp Editor, in the Deployment section, click Deploy.
-
On the Deploy a RuleApp page, leave the default deployment type as Increment RuleApp major version, and click Next.
-
Under Create a temporary Rule Execution Server Configuration, enter the following information if you use the JBoss server provided with JRules:
URL:
http://localhost:8080/bres
-
If you have deployed the Rule Execution Server Console (
jrules-bres-management EAR) to a different application server, use the following URLs:
- WebSphere:
http://localhost:9080/bres
- WebLogic:
http://localhost:7001/bres
- Oracle:
http://localhost:8888/bres
- Sun AS 82:
http://localhost:8080/bres
| Note |
| The Create a temporary Rule Execution Server Configuration radio button is selected by default because no configuration exists.
|
-
Click Finish.
You should receive the following message in the Console view:
The "loanvalidation" RuleApp project was successfully deployed on the "temporaryServer" configuration.
Next: Task 2: Executing the Loan Validation Application