Terminology for Directories and Directory Environment Variables Administration Server High Availability Installing Oracle WebLogic Server and Oracle ADF on APPHOST2

6-16 Oracle Fusion Middleware High Availability Guide If a JSF state serialization failure is detected, relaunch the application server with the system property to enable component and property flags and rerun the test: -Dorg.apache.myfaces.trinidad.CHECK_STATE_SERIALIZATION=all Since these are Java system properties, they need to be specified when the application server is started.

6.2 Configuring an Oracle ADF High Availability Deployment

This section describes how to configure an example Oracle ADF high availability deployment.

6.2.1 Terminology for Directories and Directory Environment Variables

This list describes the directories and variables used in this section: ■ ORACLE_BASE: This environment variable and related directory path refers to the base directory under which Oracle products are installed. ■ MW_HOME: This environment variable and related directory path refers to the location where Oracle Fusion Middleware resides. ■ WL_HOME: This environment variable and related directory path contains installed files necessary to host a WebLogic Server. ■ ORACLE_HOME: This environment variable and related directory path refers to the location where Oracle Fusion Middleware SOA Suite is installed. ■ ORACLE_COMMON_HOME: This environment variable and related directory path refers to the Oracle home that contains the binary and library files required for the Oracle Enterprise Manager Fusion Middleware Control and Java Required Files JRF. ■ DOMAIN directory: This directory path refers to the location where the Oracle WebLogic domain information configuration artifacts is stored. ■ ORACLE_INSTANCE: An Oracle instance contains one or more system components, such as Oracle Web Cache, Oracle HTTP Server, or Oracle Internet Directory. An Oracle instance directory contains updateable files, such as configuration files, log files, and temporary files. The values used and recommended for consistency for this directories are: ■ ORACLE_BASE: u01apporacle ■ MW_HOME application tier: ORACLE_BASEproductfmw ■ WL_HOME: MW_HOMEwlserver_10.3 ■ ORACLE_HOME: MW_HOMEadf

6.2.2 Using RCU to Load Fusion Middleware Schemas in the Database

This step is required only if your ADF application needs to use any of schemas that are part of Oracle Fusion Middleware. Typically, this is done if the ADF application uses MDS repository, in which case you must install the 11g 11.1.1 Oracle Fusion Note: Oracle strongly recommends reading the release notes for any additional installation and deployment considerations prior to starting the setup process. Configuring High Availability for Oracle ADF and WebCenter Applications 6-17 Middleware Metadata Store into a Real Application Clusters Oracle RAC database before you install Oracle Fusion Middleware. Oracle Fusion Middleware provides a tool, the Oracle Fusion Middleware Repository Creation Utility RCU, to create the component schemas in an existing database. Use the latest version of RCU to install the 11g 11.1.1 Oracle Fusion Middleware Repository into a Real Application Clusters database. See Oracle Fusion Middleware Repository Creation Utility User’s Guide for more information about obtaining and running the latest version of RCU. To check if your database is certified or to see all certified databases, refer to the Certified Databases section in the Certification Document: http:www.oracle.comtechnologysoftwareproductsiasfilesfus ion_certification.html

6.2.2.1 Running RCU

Run RCU to install the required metadata for Oracle Fusion Middleware 11g:

1. Start RCU using the following command:

RCU_HOMEbinrcu

2. In the Welcome screen, click Next.

3. In the Create Repository screen, select Create to load component schemas into a

database, and click Next. 4. In the Database Connection Details screen, enter connection information for your database: ■ Database Type : Select Oracle Database ■ Host Name : Enter the name of the node that is running the database. For an Oracle RAC database, specify the VIP name, or one of the node names as the host name: ADFDBHOST1VIRTUAL. ■ Port : The port number for the database: 1521 ■ Service Name : Enter the service name of the database: adfha.mycompany.com ■ Username : SYS ■ Password : Enter the password of the SYS user. ■ Role : SYSDBA Click Next. 5. If you receive the following message, click Ignore or Stop: The database you are connecting is with non-UTF8 charset, if you are going to use this database for multilingual support, you may have data loss. If you are not using for multilingual support you can continue, otherwise, Oracle strongly recommends using a UTF-8 database.

6. In the Select Components screen, select Create a New Prefix, and enter a prefix to

use for the database schemas, for example, ADFHA. Write down the schema names so they are available in later procedures. Select the following schemas: ■ AS Common Schemas 6-18 Oracle Fusion Middleware High Availability Guide ■ Metadata Services Click Next. 7. In the Schema Passwords screen, enter passwords for the main and additional auxiliary schema users, and click Next. 8. In the Map Tablespaces screen, choose the tablespaces for the selected components, and click Next.

9. In the Summary screen, click Create.

10. In the Completion Summary screen, click Close.

See the Oracle Fusion Middleware Repository Creation Utility Users Guide for more information about installing RCU.

6.2.3 Installing Oracle HTTP Server on WEBHOST1

To install Oracle HTTP Server on WEBHOST1: 1. Verify that the servers meet the following requirements: ■ The system, patch, kernel, and other requirements meet the requirements specified in the Oracle Fusion Middleware Repository Creation Utility Users Guide. ■ This example uses port 7777. If you choose port 7777, ensure that it is not used by any service on the nodes. You can verify this by running the following command: UNIX: netstat -an | grep LISTEN | grep :7777 Windows: netstat -an | findstr LISTEN | findstr :7777 2. If port 7777 is in use, choose another port, or make it available. 3. On UNIX platforms, if the etcoraInst.loc or varoptoracleoraInst.loc file exists, check that its contents are correct. Specifically, check that the inventory directory is correct, and that you have write permissions for that directory. If the etcoraInst.loc file does not exist, skip this step. 4. Start Oracle Universal Installer for Oracle Fusion Middleware 11g Webtier Utilities CD installation as follows: For UNIX, run this command: .runInstaller For Windows, double-click setup.exe. 5. In the Specify Inventory Directory screen, enter the location for the inventory and the user group, and click OK.

6. Execute the root privileged actions as indicated in the dialog, and click OK.

7. In the Welcome screen, click Next.

8. In the Select Installation Type screen, select Install and Configure, and click Next.

9. In the Prerequisite Checks screen, ensure that all the prerequisites are met, and click Next. 10. In the Specify Installation Location screen, set the location to: Configuring High Availability for Oracle ADF and WebCenter Applications 6-19 u01apporacleproduct11.1.1ohs_1 Click Next. 11. In the Configure Components screen: ■ Select Oracle HTTP Server. ■ Do not select Associate Selected Components with WebLogic Domain. Click Next. 12. In the Specify Component Details screen, enter the following values: ■ Instance Home Location : u01apporacleproduct11.1.1ohs_1instancesohs_instance1 ■ Instance Name : ohs_instance1 ■ OHS Component Name : ohs1 Click Next. 13. In the Specify Webtier Port Details screen: ■ Select Specify Custom Ports. If you specify a custom port, select Specify Ports using Configuration File and then use the Browse function to select the file. ■ Enter Oracle HTTP Server port. For example, enter 7777. Click Next. 14. In the Configuration Summary screen, ensure that the selections are correct, and click Install. 15. In the Installation Progress screen: For UNIX systems, a dialog box appears prompting you to run the oracleRoot.sh script. Open a command window and run the script, following the prompts. Click Next. 16. In the Configuration screen, several configuration assistants are started in succession. When the configuration assistants are finished, the Configuration Completed screen appears.

17. In the Configuration Completed screen, click Finish to exit.

6.2.3.1 Validating Oracle HTTP Server

To verify that Oracle HTTP Server is set up correctly, access the root URL context of the server by entering the following URL in a web browser: WebHost1:7777 If Oracle HTTP Server is set up correctly, the Hello World page appears in the browser. Note: For more information about setting ports, refer to the Oracle Fusion Middleware Installation Guide for Oracle SOA Suite and Oracle Business Process Management Suite. 6-20 Oracle Fusion Middleware High Availability Guide

6.2.4 Installing the Oracle Fusion Middleware Home

Use the information in these sections to install Oracle Fusion Middleware components: ■ Section 6.2.4.1, Installing Oracle WebLogic Server ■ Section 6.2.4.2, Installing Oracle Fusion Middleware for Oracle ADF Applications

6.2.4.1 Installing Oracle WebLogic Server

See Understanding Your Installation Starting Point in Oracle Fusion Middleware Installation Planning Guide for the version of Oracle WebLogic Server to use with the latest version of Oracle Fusion Middleware. To install Oracle WebLogic Server on all nodes in the application tier: 1. On UNIX platforms, if the etcoraInst.loc or varoptoracleoraInst.loc file exists, check that its contents are correct. Specifically, check that the inventory directory is correct and that you have write permissions for that directory. If the etcoraInst.loc file does not exist, skip this step. 2. Start the Oracle WebLogic Server installer.

3. In the Welcome screen, click Next.

4. In the Choose Middleware Home Directory screen: ■ Select Create a New Middleware Home. ■ For the Middleware Home Directory field, enter: ORACLE_BASE productfmw Click Next. 5. In the Register for Security Updates screen, enter your contact information for security update notifications, and click Next.

6. In the Choose Install Type screen, select Custom, and click Next.

7. In the JDK Selection screen, select only Oracle JRockit 1.6.0_14 SDK, and click

Next . 8. In the Choose Product Installation Directories screen, accept the following directory: ORACLE_BASE productfmwwlserver_10.3 Click Next. 9. In the Installation Summary screen, click Next. 10. In the Installation Complete screen, deselect Run QuickStart, and click Done.

6.2.4.2 Installing Oracle Fusion Middleware for Oracle ADF Applications

To install Oracle Fusion Middleware for Oracle ADF, use the Application Developer Install and perform the following on all the nodes in the application tier: 1. Start the Oracle Fusion Middleware for Oracle Fusion Middleware 11g Application Developer installer: On UNIX Linux used in this example: APPHOST1 runInstaller Configuring High Availability for Oracle ADF and WebCenter Applications 6-21 On Windows: APPHOST1 setup.exe When Oracle Fusion Middleware 11g Application Developer installer prompts you for a JREJDK location enter the Oracle SDK location created in the Oracle WebLogic Server installation in Section 6.2.4.1, Installing Oracle WebLogic Server, for example: ORACLE_BASE productfmwjrockit_160_14_R27.6.4-18

2. In the Welcome screen, click Next.

3. In the Prerequisite Check screen, verify that the checks complete successfully, and click Next. 4. In the Specify Installation Location screen: ■ For Middleware Home, enter: ORACLE_BASEproductfmw ■ For Oracle Home Directory, enter the directory you want to use, for example: adf Click Next. 5. In the Installation Summary screen, click Install. 6. In the Installation Complete screen, click Finish.

6.2.5 Administration Server High Availability

For information about configuring Oracle WebLogic Server Administration Server, see Chapter 12, Active-Passive Topologies for Oracle Fusion Middleware High Availability.

6.2.6 Running the Configuration Wizard on APPHOST1 to Create the WebLogic Server ADF Domain

Run the Oracle Fusion Middleware Configuration Wizard from the adf directory in the Middleware home to create a domain containing the Administration Server and Oracle components.

1. Start Oracle Fusion Middleware Configuration Wizard from the MW_

HOME commonbin directory using the following command: APPHOST1 .config.sh

2. In the Welcome screen, select Create a New WebLogic Domain and click Next.

Note: Before you run the Configuration Wizard by following the instructions in Section 6.2.6, Running the Configuration Wizard on APPHOST1 to Create the WebLogic Server ADF Domain, ensure that you applied the latest Oracle Fusion Middleware patch set and other known patches to your Middleware Home, so that you have the latest version of Oracle Fusion Middleware. See Understanding Your Installation Starting Point in Oracle Fusion Middleware Installation Planning Guide for the steps you must perform to get the latest version of Oracle Fusion Middleware. 6-22 Oracle Fusion Middleware High Availability Guide

3. In the Select Domain Source screen, select Generate a domain configured

automatically to support the following products , and select the following products: ■ Oracle Enterprise Manager - 11.1.1.0 ■ Oracle JRF - 11.1.1.0 Click Next.

4. Enter the Domain Name, Domain Location, and Application Location and click

Next . 5. In the Configure Administrator Username and Password screen, enter the username and password to be used for the domains administrator, and click Next. 6. In the Configure Server Start Mode and JDK screen, make the following selections: ■ WebLogic Domain Startup Mode : select Production Mode ■ JDK Selection : select Oracle JRockit 1.6.0_14 SDK Click Next. 7. In the Select Optional Configuration screen, select the following: ■ Administration Server ■ Managed Servers, Clusters and Machines Click Next.

8. In the Customize Server and Cluster Configuration screen, select Yes, and click

Next . 9. In the Configure the Administration Server screen, enter the following values: ■ Name : AdminServer ■ Listen Address : APPHOST1 ■ Listen Port : 7001 ■ SSL listen port : NA ■ SSL enabled : Leave unchecked Click Next. 10. In the Configure Managed Servers screen, add the following managed servers: Click Next. 11. In the Configure Clusters screen, add the following cluster: ■ Name : ADF_CLUSTER ■ Cluster Messaging Mode : unicast ■ Cluster Address Enabled : Leave blank Click Next. Managed Server Name Listen Address Listen Port SSL Listen Port SSL Enabled WLS_ADF1 Hostname of APPHOST1 8889 NA unchecked WLS_ADF2 Hostname of APPHOST2 8889 NA unchecked Configuring High Availability for Oracle ADF and WebCenter Applications 6-23 12. In the Assign Servers to Clusters screen, assign the following servers to the Cluster: ■ ADF_CLUSTER: – WLS_ADF1 – WLS_ADF2 Click Next. 13. In the Configure Machines screen: ■ Delete the LocalMachine that appears by default. ■ Click the Unix Machine tab, and add the following machines: Click Next. 14. In the Assign Servers to Machines screen, assign servers to machines as follows: ■ APPHOST1 : AdminServer, WLS_ADF1 ■ APPHOST2 : WLS_ADF2

15. In the Configuration Summary screen, click Create.

16. In the Creating Domain screen, click Done.

6.2.6.1 Creating boot.properties for the Administration Server and Managed Servers on APPHOST1

This is an optional step for enabling the Administration Server to start without prompting you for the administrator username and password. Create a boot.properties file for the Administration Server and for the managed servers on APPHOST1. For the Administration Server, follow these steps:

1. Create the following directory:

APPHOST1 mkdir -p MW_HOMEwlsuser_ projectsdomainsadfdomainserversAdminServersecurity 2. Use a text editor to create a file named boot.properties in the directory created in the previous step, and enter the following lines in the file: username=adminUser password=adminUserPassword For example: username=weblogic password=weblogic Name Node Manager Listen Address APPHOST1 Hostname of APPHOST1 APPHOST2 Hostname of APPHOST2 6-24 Oracle Fusion Middleware High Availability Guide For the WLS_ADF Managed Servers, complete the following: Copy the file you created for the Administration Server to all servers.

6.2.7 Starting the System in APPHOST1

This section describes procedures for starting the system in APPHOST1.

6.2.7.1 Starting the Administration Server on APPHOST1

To start the Administration Server on APPHOST1 run the following commands: APPHOST1 cd ORACLE_BASEproductfmwuser_projectsdomainsadfdomainbin APPHOST1 .startWebLogic.sh

6.2.7.2 Validating the Administration Server

To verify that the Administration Server is properly configured, follow these steps:

1. In a Web browser, go to http:VIP1:7001console.

2. Log in as the administrator.

3. Verify that the WLS_ADF1 and WLS_ADF2 managed servers are listed.

4. Verify that the ADF_Cluster cluster is listed.

5. Verify that you can access Enterprise Manager at http:VIP1:7001em.

6.2.7.3 Disabling Host Name Verification for the Administration Server and Managed Servers for APPHOST1 and APPHOST2 This step is required if you have not set up SSL communication between the Administration Server and the Node Manager. If SSL is not set up, you receive an error message unless you disable host name verification. You can re-enable host name verification when you have set up SSL communication between the Administration Server and the Node Manager. To disable host name verification on APPHOST1:

1. In Oracle WebLogic Server Administration Console, select Administration Server,

SSL , and then Advanced.

2. In the Change Center, click Lock Edit.

3. When prompted, save the changes and activate them.

4. Set Hostname Verification to None.

5. Select WLS_ADF1, SSL, and then Advanced.

6. Set Hostname Verification to None.

7. Restart the Administration Server and the WLS_ADF1 Managed Server.

Note: When you start the Administration Server or Managed Server, username and password entries in the file are encrypted. For security reasons, minimize the time the entries in the file are left unencrypted. After you edit the file, start the server as soon as possible in order for the entries to be encrypted. Configuring High Availability for Oracle ADF and WebCenter Applications 6-25 To disable host name verification on APPHOST2:

1. In Oracle WebLogic Server Administration Console, select WLS_ADF2, SSL, and

then Advanced. 2. Set Hostname Verification to None. 3. Restart the Administration Server and the WLS_ADF2 Managed Server.

6.2.7.4 Starting Node Manager on APPHOST1

Perform these steps to start Node Manager on APPHOST1:

1. Run the setNMProps.sh script, which is located in the ORACLE_COMMON_

HOMEcommonbin directory, to set the StartScriptEnabled property to true before starting Node Manager: OAHOST1 cd ORACLE_COMMON_HOMEcommonbin APPHOST1 .setNMProps.sh

2. Start Node Manager:

APPHOST1 cd WL_HOMEserverbin APPHOST1 .startNodeManager.sh

6.2.8 Installing Oracle WebLogic Server and Oracle ADF on APPHOST2

Repeat the procedures for installing WebLogic Server and Oracle ADF for APPHOST2, start with Section 6.2.3, Installing Oracle HTTP Server on WEBHOST1. The directory paths for binary files and domains used when installing new nodes must be exactly the same as those used for the first node. If these paths and domains are not exactly the same as those used for the first node, failover does not occur.

6.2.9 Propagating the Domain Configuration to APPHOST2 with packunpack Utilities