Skip Headers
Oracle® Application Server Upgrade and Compatibility Guide
10g Release 3 (10.1.3.1.0)
B31015-01
  Go To Documentation Library
Home
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

A Step-By-Step Upgrade Examples

This chapter provides step-by-step examples that can help you better understand the 10g Release 3 (10.1.3.1.0) upgrade process.

Refer to the following for more information:

A.1 Upgrading FAQApp on a Single Oracle Application Server Instance

The following sections provide an example of upgrading and redeploying an existing application on a single 10g Release 3 (10.1.3.1.0) OC4J instance:

A.1.1 Starting Point for the FAQApp Upgrade

This procedure assumes the following starting point for the FAQApp upgrade:

  • You have installed and configured a single 10g Release 2 (10.1.2) middle-tier Oracle home.


    Note:

    This procedure describes specifically how to upgrade from 10g Release 2 (10.1.2), but the procedure is also valid if you are using 10g (9.0.4) as your starting point.

  • You have optionally made some site-specific changes to the Oracle HTTP Server configuration file (httpd.conf).

  • You have successfully deployed the FAQApp sample application to the 10g Release 2 (10.1.2) middle tier.

    The FAQApp is available for download from the following location on Oracle Technology Network (OTN):

    
    http://www.oracle.com/technology/tech/java/oc4j/demos/904/index.html
    
    

    See Also:

    "Configuring the FAQ Application Demo" in the Oracle Application Server Containers for J2EE User's Guide in the 10g Release 2 (10.1.2) documentation library, which is available from the following location on the Oracle Technology Network (OTN):
    
    http://www.oracle.com/technology/documentation/appserver101202.html
    
    

  • You now want to deploy the same FAQApp application on an instance of Oracle Application Server 10g Release 3 (10.1.3.1.0).

  • You have installed and configured Apache Ant, which is a Java-based build tool that is included in the following directory of your 10g Release 3 (10.1.3.1.0) Oracle home:

    
    (UNIX) 1013_ORACLE_HOME/ant/
    
    (Windows) 1013_ORACLE_HOME\ant\
    
    
    
    

    Apache Ant, as well as documentation for using the tool, is also available from the following Web site:

    
    http://ant.apache.org/
    
    

A.1.2 Overview of the FAQApp Upgrade Procedure

The steps in the following procedure involve installing a new 10g Release 3 (10.1.3.1.0) Oracle home, modifying and rebuilding FAQApp, and then redeploying FAQapp on the new 10g Release 3 (10.1.3.1.0) OC4J instance, as shown in Figure A-1.

Figure A-1 Overview of the FAQApp Upgrade Procedure

Description of Figure A-1 follows
Description of "Figure A-1 Overview of the FAQApp Upgrade Procedure"

A.1.3 The FAQApp Upgrade Procedure

The following sections describe the steps you can follow to install and configure a new 10g Release 3 (10.1.3.1.0) Oracle home and then recompile and redeploy the FAQApp on the new installation:

A.1.3.1 Step 1: Install 10g Release 3 (10.1.3.1.0)

Use the following steps to install a new 10g Release 3 (10.1.3.1.0) Oracle home. In this particular example, you will install a combined 10g Release 3 (10.1.3.1.0) Web server and OC4J instance in a single Oracle home:

  1. Log in to the host computer and start Oracle Universal Installer.

    You can install the 10g Release 3 (10.1.3.1.0) Oracle home on the same host as the 10g Release 2 (10.1.2) J2EE and Web Cache Oracle home, or on a different host.


    See Also:

    "Starting the Oracle Universal Installer" in the Oracle Application Server Installation Guide

  2. On the Oracle Application Server 10g 10.1.3.0.0 Installation Screen, do the following:

    1. In the Installation Directory field, enter the path to a directory where the application server instance will be installed.

    2. Select Advanced Install.

    3. Click Next.

  3. When you are prompted to confirm that you want to use the Advanced Install options, click Next.

  4. On the Select Installation Type page, select J2EE Server and Web Server.

    This installation type installs a combined Web server and OC4J Instance in a single Oracle home.

  5. Click Next and follow the instructions on each screen until you see the Administration Settings page.

  6. On the Administration Settings page, be sure to select Configure this as an Administration OC4J.

  7. Click Next and then follow the instructions on each screen to advance through the installation procedure.

    The installation is complete when the End of Installation Screen appears. This screen tells you whether or not your installation was successful. It also provides information about the default Oracle HTTP Server port, as well as the URL you can use to access the 10g Release 3 (10.1.3.1.0) Application Server Control Console.

A.1.3.2 Step 2: Apply Any Site-Specific Oracle HTTP Server Configuration Settings

If you have made any site-specific configuration changes to the Oracle HTTP Server httpd.conf configuration file in the 10g Release 2 (10.1.2) Oracle home, apply those changes to the httpd.conf file in the 10g Release 3 (10.1.3.1.0) Oracle home.

Like the 10g Release 2 (10.1.2) release, the 10g Release 3 (10.1.3.1.0) Oracle HTTP Server is based on the on Apache 1.3 Web Server. As a result, you can copy any configuration changes (such as modifications to the httpd.conf file) directly to the 10g Release 3 (10.1.3.1.0) Oracle home.

A.1.3.3 Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance

The FAQApp uses a data source that consists of an Oracle database where the FAQ schema has been installed. This procedure assumes that you have successfully deployed and configured the FAQApp in a previous Oracle Application Server release. As a result, the FAQ schema already exists in an existing Oracle database.

However, before you deploy the FAQApp on the new 10g Release 3 (10.1.3.1.0) instance, use the following procedure to configure the OracleDS data source, which is required by the FAQApp application, in the new 10g Release 3 (10.1.3.1.0) OC4J container.


Note:

This procedure modifies the existing OracleDS datasource that is defined as part of the default application, which means that the datasource is available to all applications deployed on this instance. Alternatively, you could define the data source using a data-sources.xml file within the FAQApp EAR file.

For more information about defining JDBC data sources, see the Oracle Containers for J2EE Services Guide.


  1. Use your browser to display the 10g Release 3 (10.1.3.1.0) Application Server Control Console.

    The URL for the Application Server Control Console is shown on the End of Installation Screen. This information is also saved to the following file in the 10g Release 3 (10.1.3.1.0) Oracle home:

    
    (UNIX) ORACLE_HOME/install/readme.txt
    
    (Windows) ORACLE_HOME\install\readme.txt
    
    
    
    

    The first page that appears in the Application Server Control Console is the Cluster Topology page.

  2. In the Members section of the Cluster Topology page, click home to display the OC4J Home page for the default home instance.

  3. From the OC4J Home page, click Administration.

  4. On the OC4J Administration page, click the task icon in the JDBC Resources row of the task table.

    Note that an "OracleDS" data source is created during the Oracle Application Server installation. However, this data source is a managed data source that relies on the "Example Connection Pool" to make its connections to the data base.

  5. Click Example Connection Pool to display the Edit Connection Pool page.

  6. Enter the JDBC URL that provides a connection to the Oracle database that hosts the FAQ schema and click Apply.

    Use the following format for the connection URL:

    
    jdbc:oracle:thin:@hostname:port:sid
    
    
    
    

    For example:

    
    jdbc:oracle:thin:@appserv1.acme.com:1521:orcl
    
    

    Hint:

    If you have trouble constructing the JDBC connection URL, you can optionally do the following:
    1. Click Create in the Connection Pool section of the JDBC Resources page to create a new connection pool.

    2. On the Connection Pool - Application page, select the default application, and then select New Connection Pool.

    3. Click Continue to display the Create Connection Pool page. On this page, you can enter information about your database and Application Server Control will construct the JDBC URL for you automatically. From this page, you can also test the connection to be sure it is working before you proceed.

    4. Delete the existing OracleDS data source and create a new OracleDS data source that uses the connection pool you just created.


  7. Navigate to the Cluster Topology page and restart the OC4J instance to load the new connection URL for the JDBC connection pool.

    Note that when you restart the home instance, Application Server Control is also restarted. As a result, you must wait a few seconds and then enter the URL for the Application Server Control Console again. You can then log into the restarted Application Server Control Console.

A.1.3.4 Step 4: Rebuild the FAQApp EAR File With Required JSP Library Archives

The FAQApp requires the JavaServer Pages (JSP) Standard Tag Libraries. In previous versions of Oracle Application Server, these libraries were automatically available as part of the OC4J instance. In 10g Release 3 (10.1.3.1.0), if an application requires the JSP tag libraries, then these two jar files must be included as part of the application EAR file before you deploy the application.

Use the following procedure to locate the JSP Standard Tag Libraries in your existing 10g Release 3 (10.1.3.1.0) Oracle home and include them in the FAQApp EAR file:

  1. If you have not done so already, unpack the FAQApp.ear file into a temporary, working directory.

    Note that a copy of the FAQApp.ear file that you deployed on 10g Release 2 (10.1.2) should be available in the following directory in the 10g Release 2 (10.1.2) Oracle home:

    
    (UNIX) 1012_ORACLE_HOME/j2ee/OC4J_Instance/applications/FAQApp.ear
    
    (Windows) 1012_ORACLE_HOME\j2ee\OC4J_Instance\applications\FAQApp.ear
    
    
    
    

    In this example, replace 1012_ORACLE_HOME with the complete path to the 10g Release 2 (10.1.2) Oracle home, and replace OC4J_Instance with the name of the 10g Release 2 (10.1.2) OC4J instance that you used to deploy the FAQApp application.

  2. Locate the following archives in the Oracle home of a 10g Release 3 (10.1.3.1.0) installation:

    UNIX:

    
    1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/standard.jar
    
    1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar
    
    
    
    

    Windows:

    
    1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\standard.jar
    
    1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\jstl.jar
    
    
    
    
  3. Copy these two .jar files to the following directory in the FAQApp working directory:

    
    faq/lib/
    
    
    
    
  4. Delete any existing archives (.ear, .war, or other files) from the FAQApp working directory:

    
    faq/dist/
    
    
    
    

    Note that this step is important because the ant all command (which you run in the next step) will not remove or overwrite any existing archive files in the dist directory. As a result a new EAR file will not be created if a previous version of the EAR file exists in the faq/dist directory.

  5. Use Apache Ant to rebuild the jar file using the following command:

    
    ant all
    
    
    
    

    When you enter this command, Apache Ant compiles and builds the FAQApp application EAR file, based on the information provided in the build.xml file that is included in the faq directory.


    See Also:

    Apache Ant Project Web Site at:
    
    http://ant.apache.org/
    
    


    Note:

    This example uses Apache Ant to rebuild the FAQApp.ear file. In fact, you can use other tools to perform this task. For more information, see the Oracle Containers for J2EE Deployment Guide.

  6. Locate the new FAQApp EAR file in the following location in the FAQApp working directory:

    
    faq/dist/FAQApp.ear
    
    

A.1.3.5 Step 5: Deploy the Modified FAQApp EAR File on 10g Release 3 (10.1.3)

Use the following procedure to deploy the modified FAQApp sample application on your new 10g Release 3 (10.1.3.1.0) OC4J instance.


Note:

This procedure describes how to use the Application Server Control Console to deploy the FAQApp sample application. Note, however, that OC4J 10g Release 3 (10.1.3.1.0) provides a number of options for deploying your applications.

For more information, see "Deployment Tool Options Provided with OC4J" in the Oracle Containers for J2EE Deployment Guide.


  1. Navigate to the OC4J Home page in the 10g Release 3 (10.1.3.1.0) Application Server Control Console.

  2. Click Applications to display the Applications page.

  3. Click Deploy.

  4. On the Deploy: Select Archive page, click Browse and select the modified FAQApp.ear file.

    Do not change the other default settings on the page.

  5. On the Deploy: Application Attributes page, enter FAQApp in the Application Name field.

    Do not change the other default settings on the page.

  6. On the Deploy: Deployment Settings page, click Deploy to deploy the FAQApp application on the 10g Release 3 (10.1.3.1.0) OC4J instance.

    Application Server Control displays the progress of the deployment and then displays a message indicating whether or not the deployment was successful.

    If the deployment was not successful, review the progress messages for any specific error messages.

    If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section A.1.3.3, "Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has access rights to the FAQ schema.

A.1.3.6 Step 6: Test the FAQApp Sample Application on 10g Release 3 (10.1.3.1.0)

If the deployment was successful, you can verify that the FAQApp application is working properly by accessing the following URL in your Web browser:


http://host.domain:port/FAQApp/



For example:


http://appserv1.acme.com:7779/FAQApp/



The FAQApp prompts you for a username and password. It is assumed you configured the users and roles for the application when you deployed FAQApp on your previous Oracle Application Server installation.

Enter faq as the username and faq as the password. The FAQApp home page should appear as shown in Figure A-2. If the application does not display, note any error messages that appear in the browser window.

If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section A.1.3.3, "Step 3: Configure the FAQApp Data Source in the 10g Release 3 (10.1.3) Instance". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has access rights to the FAQ schema.

Figure A-2 Successfully Deployed FAQApp Sample Application

Description of Figure A-2 follows
Description of "Figure A-2 Successfully Deployed FAQApp Sample Application"

A.2 Upgrading FAQApp in a Clustered Environment

The following sections provide an example of upgrading to a 10g Release 2 (10.1.2) clustered environment and redeploying an existing application on a new 10g Release 3 (10.1.3.1.0) cluster:

A.2.1 Starting Point for Upgrading FAQApp in a Clustered Environment

This procedure assumes the following starting point for the FAQApp upgrade:

  • You have installed and configured a 10g Release 2 (10.1.2) OracleAS Farm and created an OracleAS Cluster within that farm.


    Note:

    This procedure describes specifically how to upgrade from 10g Release 2 (10.1.2), but the procedure is also valid if you are using 10g (9.0.4) as your starting point.

  • You have successfully deployed the FAQApp sample application to the 10g Release 2 (10.1.2) OracleAS Cluster.

    The FAQApp is available for download from the following location on Oracle Technology Network (OTN):

    
    http://www.oracle.com/technology/tech/java/oc4j/demos/904/index.html
    
    

    See Also:

    "Configuring the FAQ Application Demo" in the Oracle Application Server Containers for J2EE User's Guide in the 10g Release 2 (10.1.2) documentation library

  • You now want to deploy the same FAQApp application on a similar, Oracle Application Server 10g Release 3 (10.1.3.1.0) clustered environment.

  • You have installed and configured Apache Ant, which is a Java-based build tool that is included in the following directory of your 10g Release 3 (10.1.3.1.0) Oracle home:

    
    (UNIX) 1013_ORACLE_HOME/ant/
    
    (Windows) 1013_ORACLE_HOME\ant\
    
    
    
    

    Apache Ant, as well as documentation for using the tool, is also available from the following Web site:

    
    http://ant.apache.org/
    
    

A.2.2 Overview of Upgrading FAQApp in a Clustered Environment

The steps in the following procedure involve installing a new 10g Release 3 (10.1.3.1.0) Oracle home, modifying and rebuilding FAQApp, and then redeploying FAQapp on the new 10g Release 3 (10.1.3.1.0) OC4J instance, as shown in Figure A-3.

Figure A-3 Overview of Upgrading FAQApp in a Clustered Environment

Description of Figure A-3 follows
Description of "Figure A-3 Overview of Upgrading FAQApp in a Clustered Environment"

A.2.3 The FAQApp Upgrade Procedure in a Clustered Environment

The following sections describe the steps you can follow to install and configure a 10g Release 3 (10.1.3.1.0) clustered environment and then redeploy the FAQApp on the new cluster:

A.2.3.1 Step 1: Install and Configure a 10g Release 3 (10.1.3.1.0) Cluster

Use the following steps to install a new 10g Release 3 (10.1.3.1.0) clustered environment:

  1. For the first middle tier Oracle home, install an Administration OC4J instance.

    After you start Oracle Universal Installer, select Advanced Install and then select J2EE Server and Web Server.

    During the installation procedure, follow the prompts, ensuring you do the following:

    • In the Administration Instance Settings page, select Configure this as an Administration OC4J Instance.

    • In the Administration Settings page, make a note of the oc4jadmin password you enter in the Administrator Account Password fields; you will need that password later.

    • In the Cluster Topology Configuration screen, select Configure this HTTP Server instance to be part of an Oracle Application Server cluster topology and specify a multicast discovery address for the cluster.

      Make a note of the address and port that you enter on this page; you will need it later.

      The multicast address you enter must be within the valid address range, which is 224.0.1.0 to 239.255.255.255. There are no restrictions on the four-digit port number.

  2. For the second middle tier, perform another J2EE Server and Web Server advanced installation.

    During the installation procedure, follow the prompts, ensuring you perform the following:

    • In the Administration Instance Settings page, deselect Configure this as an Administration OC4J Instance. Only one administration OC4J is required for each cluster.

    • In the Administration Settings page, enter the same oc4jadmin password in the Administrator Account Password fields that you entered in Step 1.

      It is important that you enter the same oc4jadmin password that you entered during the first installation. In order to use groups, each OC4J instance in the group must have the same oc4jadmin password. If they do not, then you will have to reset the password after the installation.

    • In the Cluster Topology Configuration screen, select Configure this HTTP Server instance to be part of an Oracle Application Server cluster topology and enter the same multicast address and port you entered in Step 1. Instances that share the same multicast address are automatically configured as a cluster.


    See Also:

    "Configuring Multiple OC4J Middle Tiers in a Cluster," in the Oracle Application Server Administrator's Guide for further information about configuring this topology

  3. Verify that the installation and formation of the cluster was successful; do this by using your Web browser to display the 10g Release 3 (10.1.3.1.0) Application Server Control Console.

    The URL for the Application Server Control Console is shown on the End of Installation Screen. This information is also saved to the following file in the first 10g Release 3 (10.1.3.1.0) Oracle home that you installed:

    
    (UNIX) ORACLE_HOME/install/readme.txt
    
    (Windows) ORACLE_HOME\install\readme.txt
    
    
    
    

    When you first display the Application Server Control Console, both of the 10g Release 3 (10.1.3.1.0) installations should appear on the Cluster Topology page.

A.2.3.2 Step 2: Apply Any Site-Specific Oracle HTTP Server Configuration Settings

If you have made any site-specific configuration changes to the Oracle HTTP Server httpd.conf configuration file in the 10g Release 2 (10.1.2) OracleAS Cluster, apply those changes to the httpd.conf file in each of the 10g Release 3 (10.1.3.1.0) Oracle homes.

Like the 10g Release 2 (10.1.2) release, the 10g Release 3 (10.1.3.1.0) Oracle HTTP Server is based on the on Apache 1.3 Web Server. As a result, you can copy any configuration changes (such as modifications to the httpd.conf file) directly to the 10g Release 3 (10.1.3.1.0) Oracle homes.


See Also:

Oracle HTTP Server Administrator's Guide

A.2.3.3 Step 3: Create an FAQApp Group

Within a 10g Release 3 (10.1.3.1.0) cluster, you can organize multiple OC4J instances into a single group. You can then perform specific deployment and configuration tasks on the group.

To create a group for the FAQApp:

  1. Navigate to the Cluster Topology page in the Application Server Control Console.

  2. In the Members section of the page, click the name of the first application server instance you installed.

  3. From the Application Server page, click Create OC4J Instance.

    Application Server Control displays the Create OC4J Instance page (Figure A-4).

  4. On the Create OC4J Instance page, do the following:

    1. Enter FAQApp_OC4J1 in the OC4J instance name field.

    2. Select Add to a new group with name.

    3. Enter FAQApp_Group in the New Group Name field.

    4. Select Start this OC4J instance after creation.

    5. Click Create.

  5. Return to the Cluster Topology page and click the name of the second application server instance you installed.

  6. From the Application Server page, click Create OC4J Instance.

  7. On the Create OC4J Instance page, do the following:

    1. Enter FAQApp_OC4J2 in the OC4J instance name field.

    2. Select Add to an existing group with name.

    3. Select FAQApp_Group from the Existing Group Name drop-down menu.

    4. Select Start this OC4J instance after creation.

    5. Click Create.

  8. Return to the Cluster Topology page and scroll to the Groups section of the page.

  9. Note that the new FAQApp group contains both the FAQApp_OC4J1 instance and the FAQApp_OC4J2 instance.

Figure A-4 Create OC4J Instance Page

Description of Figure A-4 follows
Description of "Figure A-4 Create OC4J Instance Page"

A.2.3.4 Step 4: Configure the FAQApp Data Source for the Group

The FAQApp uses a data source that consists of an Oracle Database where the FAQ schema has been installed. This procedure assumes that you have successfully deployed and configured the FAQApp in a previous Oracle Application Server release. As a result, the FAQ schema already exists in an existing Oracle database.

However, before you deploy the FAQApp on the 10g Release 3 (10.1.3.1.0) group, you must use the following procedure to configure the OracleDS data source, which is required by the FAQApp application.

Use the following procedure to define the data source for all the OC4J instances in the FAQApp group:

  1. From the Cluster Topology page in the Application Server Control Console, scroll to the Groups section of the page.

  2. Click the name of the FAQApp group.

  3. From the Group page, click Administration.

  4. On the Group Administration page, click the task icon in the JDBC Resources row of the task table.

    Note that an "OracleDS" data source has already been created. However, this data source is a managed data source that relies on the "Example Connection Pool" to make its connections to the data base.

  5. Click Example Connection Pool to display the Edit Connection Pool page.

  6. Enter the JDBC URL that provides a connection to the Oracle database that hosts the FAQ schema and click Apply.

    Use the following format for the connection URL:

    
    jdbc:oracle:thin:@hostname:port:sid
    
    
    
    

    For example:

    
    jdbc:oracle:thin:@appserv1.acme.com:1521:orcl
    
    

    Hint:

    If you have trouble constructing the JDBC connection URL, you can optionally do the following:
    1. Click Create in the Connection Pool section of the JDBC Resources page to create a new connection pool.

    2. On the Connection Pool - Application page, select the default application, and then select New Connection Pool.

    3. Click Continue to display the Create Connection Pool page. On this page, you can enter information about your database and Application Server Control will construct the JDBC URL for you automatically. From this page, you can also test the connection to be sure it is working before you proceed.

    4. Delete the existing OracleDS data source and create a new OracleDS data source that uses the connection pool you just created.


  7. Restart the FAQApp group to load the new JDBC connection pool URL:

    1. Navigate to the Cluster Topology page.

    2. Select the FAQApp group.

    3. Click Stop.

    4. After Application Server Control confirms that the group has been stopped, select the FAQApp group again and click Start.

A.2.3.5 Step 5: Rebuild the FAQApp EAR File With Required JSP Library Archives

The FAQApp requires the JavaServer Pages (JSP) Standard Tag Libraries. In previous versions of Oracle Application Server, these libraries were automatically available as part of the OC4J instance. In 10g Release 3 (10.1.3.1.0), if an application requires the JSP tag libraries, then these two jar files must be included as part of the application EAR file before you deploy the application.

Use the following procedure to locate the JSP Standard Tag Libraries in your existing 10g Release 3 (10.1.3.1.0) Oracle home and include them in the FAQApp EAR file:

  1. If you have not done so already, unpack the FAQApp.ear file into a temporary, working directory.

    Note that a copy of the FAQApp.ear file that you deployed on 10g Release 2 (10.1.2) should be available in the following directory in the 10g Release 2 (10.1.2) Oracle home:

    
    (UNIX) 1012_ORACLE_HOME/j2ee/OC4J_Instance/applications/FAQApp/FAQApp.ear
    
    (Windows) 1012_ORACLE_HOME\j2ee\OC4J_Instance\applications\FAQApp\FAQApp.ear
    
    
    
    

    In this example, replace 1012_ORACLE_HOME with the complete path to the 10g Release 2 (10.1.2) Oracle home, and replace OC4J_Instance with the name of the OC4J instance that you used to deploy the FAQApp application.

  2. Locate the following archives in the Oracle home of a 10g Release 3 (10.1.3.1.0) installation:

    UNIX:

    
    1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/standard.jar
    
    1013_ORACLE_HOME/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar
    
    
    
    

    Windows:

    
    1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\standard.jar
    
    1013_ORACLE_HOME\j2ee\home\default-web-app\WEB-INF\lib\jstl.jar
    
    
    
    
  3. Copy these two .jar files to the following directory in the FAQApp working directory:

    
    faq/lib/
    
    
    
    
  4. Delete any existing archives (.ear, .war, or other files) from the FAQApp working directory:

    
    faq/dist/
    
    
    
    

    Note that this step is important because the ant all command (which will be used in the next step) will not remove or overwrite any existing archive files in the dist directory. As a result a new EAR file will not be created if a previous version of the EAR file exists in the faq/dist directory.

  5. Use Apache Ant to rebuild the jar file using the following command:

    
    ant all
    
    
    
    

    When you enter this command, Apache Ant compiles and builds the FAQApp application EAR file, based on the information provided in the build.xml file that is included in the faq directory.


    See Also:

    Apache Ant Project Web Site at:
    
    http://ant.apache.org/
    
    


    Note:

    This example uses Apache Ant to rebuild the FAQApp.ear file. In fact, you can use other tools to perform this task. For more information, see the Oracle Containers for J2EE Deployment Guide.

  6. Locate the new FAQApp EAR file in the following location in the FAQApp working directory:

    
    faq/dist/FAQApp.ear
    
    

A.2.3.6 Step 6: Deploy FAQApp and Configure Application Clustering

Use the following procedure to deploy the modified FAQApp sample application on the 10g Release 3 (10.1.3.1.0) FAQApp group.

During the deployment, you can also configure application clustering for the FAQApp, which enables session state replication across the application instances in the cluster. Examples of session state information include whether or not a user is logged in and the contents of a shopping cart.

Oracle Application Server 10g Release 3 (10.1.3.1.0) offers three protocols for session state replication. In this example, you enable the peer-to-peer replication protocol. When you select this protocol, OPMN automatically replicates state information to the other OC4J instances in the 10g Release 3 (10.1.3.1.0) cluster.

To deploy the FAQApp on the FAQApp group and configure application clustering:

  1. Navigate to the Cluster Topology page in the 10g Release 3 (10.1.3.1.0) Application Server Control Console.

  2. Click the name of the FAQApp group to display the FAQApp Group page.

  3. Click Applications to display the Group Applications page.

  4. Click Deploy.

  5. On the Deploy: Select Archive page, click Browse and select the updated FAQApp.ear file.

    Do not change the other default settings on the page.

  6. On the Deploy: Application Attributes page, enter FAQApp in the Application Name field.

    Do not change the other default settings on the page.

  7. On the Deploy: Deployment Settings page, click Configure Clustering and use the resulting page to enable session state replication for the FAQApp application:

    1. Select Override parent application clustering settings.

    2. Select Enable from the Clustering drop-down menu.

    3. Select Peer-Peer Replication; do not enter a value in the Bind Address field unless the host computer has multiple network cards.

    4. Click OK.

  8. Click Deploy to deploy FAQApp to both OC4J instances in the FAQApp group.

    Application Server Control displays the progress of the deployment and then displays a message indicating whether or not the deployment was successful.

    If the deployment was not successful, review the progress messages for any specific error messages.

    If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section A.2.3.4, "Step 4: Configure the FAQApp Data Source for the Group". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has access rights to the FAQ schema.

A.2.3.7 Step 7: Test the FAQApp Sample Application on 10g Release 3 (10.1.3.1.0)

If the deployment was successful, you can verify that the FAQApp application is working properly by accessing the following URL in your Web browser:


http://host.domain:port/FAQApp/



For example:


http://appserv1.acme.com:7779/FAQApp/



The FAQApp prompts you for a username and password. It is assumed you configured the users and roles for the application when you deployed FAQApp on your previous Oracle Application Server installation.

Enter faq as the username and faq as the password. The FAQApp home page should appear as shown in Figure A-2. If the application does not display, note any error messages that appear in the browser window.

If any error messages mention SQL or database connections, the problem is likely with the data source configuration. Review the steps you performed in Section A.2.3.4, "Step 4: Configure the FAQApp Data Source for the Group". Verify that the data source is valid and that the FAQ schema exists in the database. Verify that the database user name you used to connect to the database has access rights to the FAQ schema.