Sunday, 30 August 2015

Deploy Oracle ADF Fusion Web Application in Weblogic Server

Requirement: I have an Oracle ADF Fusion Web Application. I want to deploy this application in Oracle Weblogic Server.

Solution: We will use the COUNTRIES table of Oracle database XE present in the HR schema. For solution to the above requirement follow the below steps:

Step 1: Create an Oracle ADF Fusion Web Application.

Step 2:  Create an ADF Business Components from tables.The ADF Business Components should contain: AppModule, CountriesEO, and CountriesVO as shown below:

Step 3: Create a JDBC Generic Data Source in Oracle Weblogic Server for the HR Schema of the Oracle Database XE as described in the post of (Saturday, 29 August 2105) that is Create a JDBC generic data sources in Oracle Weblogic Server . Details about the JDBC Generic Datasource is given below:

Step 4: Open AppModule --> Go to Configurations tab -->Edit the Datasource Name of the AppModuleLocal and AppModuleShared from java:comp/env/jdbc/HRDS to jdbc/HR as shown below:

Step 5: Go to Application Resources. Expand Connections --> Database --> Delete HR connection as shown below.

Step 6: Create a demo.jsf page under the ViewController project of our application. Now  drag and drop CountriesVO1 collection from the Data Controls as an af:table on the demo.jsf page as shown below:

Step 7: Save all and run the application just to check if the application is running correctly.

Step 8: Right click application that is Deployment in this case, as Deployment is the name of my appplication --> Deploy --> New Deployment Profile as shown below:

Thus, we will get the below "Create Deployment Profile" popup, as shown below. Give the Deployment Profile Name as myDeploymentEAR, and click OK

On click of Ok we will get "Edit EAR Deployment Profile Properties" popup as shown below:

Click Application Assembly, and expand Model.jpr and ViewController.jpr as shown below:

Check Deployment_Model and Deployment_ViewController_webapp as shown below and click OK.

Step 9: Right click application that is Deployment in this case, as Deployment is the name of my appplication --> Deploy -->myDeploymentEAR as shown below.

Thus we will get Deploy myDeploymentEAR popup as shown below. Select Deploy to EAR and Click Next.

Click Finish. Thus the EAR(myDeploymentEAR.ear) gets created in the below file location(in this case it is C:\Users\Susanto\Desktop\ADFSecurity\Deployment\deploy\myDeploymentEAR.ear, it will be different location for your case).

Step 10: Open Oracle Weblogic Server using valid credentials. For login page of Oracle Weblogic Server type "http://localhost:7101/console" in the browser.

Step 11: Click on Deployments link as shown below:

Step 12: Click on Install button as shown below:

Step 13: Click on upload your file(s) link as shown below: 

Step 14: Browse the Deployment Archive that is myDeploymentEAR.ear from
C:\Users\Susanto\Desktop\ADFSecurity\Deployment\deploy\ as shown below:

Step 15: Click Next --> Select myDeploymentEAR radio button and click Next 

Step 16: Click Next --> Click Next --> Click Finish.

Step 17: Click Save.

Step 18: Type the below URL of the application in the browser (this will vary for your application):

Thus we can see the page running as shown below:

Thus the solution to our requirement.

Thanks & Regards,
Susanto Paul