4 Using SmartUpgrade Generated Artifacts

In addition to generating an upgrade report, SmartUpgrade can generate artifacts, such as the following:

For the generated deployment descriptors, you can review the generated Oracle WebLogic Server elements and use them as a starting point for upgrading your application so you can deploy it successfully on Oracle WebLogic Server.

The following sections describe how to use artifacts generated by SmartUpgrade to upgrade your applications so they can be deployed on Oracle WebLogic Server:

4.1 Overview of the Steps Required to Use the SmartUpgrade Generated Artifacts

In most cases, the process of upgrading an application from Oracle Containers for Java EE (OC4J) to Oracle WebLogic Server 11g is an iterative process:

  1. You run SmartUpgrade once to generate a report and some initial Oracle WebLogic Server artifacts.

  2. You review the report, make changes, and then run SmartUpgrade again.

  3. You repeat the process until the application is ready to deploy on Oracle WebLogic Server.

Figure 4-1 provides a flow chart of the steps you can use to analyze an application, review the report, and make iterative changes before finally deploying the application on Oracle WebLogic Server.

Table 4-1 provides a description of each step shown in the flow chart.

Figure 4-1 Flow Chart of the SmartUpgrade Process

Description of Figure 4-1 follows
Description of "Figure 4-1 Flow Chart of the SmartUpgrade Process"

Table 4-1 Description of the Steps in the SmartUpgrade Process Flow Chart

Step Description

Run the SmartUpgrade Wizard in JDev or use the command line

From Oracle JDeveloper, start the Java EE Upgrade wizard, as described in Section 2.3, "Starting and Using the Java EE Upgrade Wizard"

From the command-line interface, run the command-line arguments, as described in Chapter 3, "Using the SmartUpgrade Command Line".

Review Upgrade Report

If you are using Oracle JDeveloper, refer to Section 2.4, "Using a SmartUpgrade Report".

If you are using the command-line, open the resulting report in a text editor, or use the appropriate command-line arguments to generate an HTML report that you can review in a Web browser.

For more information, see Section 3.1.7.4, "Using the SmartUpgrade Command-Line Interface to Generate an HTML Report".

In either case, the finding should indicate whether any artifacts were generated for the finding. This information can be useful later when you are deciding how to implement suggested changes to your application.

Determine where to make the changes

In some cases, the report findings include suggestions on modifications you must make to your application before it will deploy successfully on Oracle WebLogic Server.

Some of the identified changes are better made in the original applications; others can be made easier by starting with the files generated by SmartUpgrade.

Note that each finding in the report indicates whether or not any artifacts were generated for the finding.

Open original project and make suggested changes

If the findings recommend making changes that you can perform on the original sources, open the original project and make the modifications there.

Make changes and/or provide additional information for Web services

If the findings or the SmartUpgrade output messages identify any Web services-specific errors or recommendations, you might be asked to make the changes and then regenerate or continue the upgrade process.

For example, if you are using Oracle JDeveloper, you might see a finding called "Web Service Artifact Generation 10.1.3" in the Upgrade report. The finding recommends that you select Regenerate from the Upgrade Report context menu and select specific artifact generation options.

You will also see a warning message in the SmartUpgrade log window.

Select Regenerate, then Continue with Web service upgrade in Jdev, or use -continue on the command-line

For more information, see the following:

Locate the generated EAR file

When SmartUpgrade generates artifacts, it organizes them into a valid EAR file structure and archives a new EAR file. The EAR file is located in the following directory in your new project directory:

  • If you are using Oracle JDeveloper and you are using the default output directory for SmartUpgrade:

    gen_src/app_name_ear.d/final/
    
  • If you are using the command-line interface:

    upgrade/app_name_ear.d/final/
    

For more information, see Appendix A, "Output Directories Generated by SmartUpgrade".

Unpack generated EAR file in FINAL directory

If you unpack the generated EAR file, you can review the generated artifacts to see the changes that were made to your files in order to deploy them on Oracle WebLogic Server.

You can attempt to deploy this EAR file on Oracle WebLogic Server "as is" or you can use the contents as a starting point for additional modifications, by reviewing or modifying the individual artifacts in the EAR file.

Note that if you are using Oracle JDeveloper, you can also browse the contents of the EAR file via the Application Navigator.

Make suggested changes

If you have yet to deploy your application on Oracle WebLogic Server, then you can use this step to make changes suggested by the findings in the SmartUpgrade report.

If you received errors while attempting to deploy the application EAR file on Oracle WebLogic Server, you can use this step to make any changes suggested by the Oracle WebLogic Server deployment errors.

Repackage EAR file

After you make changes to the unpacked EAR file that was generated by SmartUpgrade, you can then re-archive it manually using the appropriate Java command or other utility.


4.2 Additional Information About the Web Services Artifacts Generated by SmartUpgrade

The following sections provide additional information about the Web services artifacts generated by SmartUpgrade:

4.2.1 Differences Between OC4J and Oracle WebLogic Server Web Services

For general information about the differences between OC4J and Oracle WebLogic Server Web services, refer to the following resources:

4.2.2 Capabilities of the SmartUpgrade Web Services Artifact Generation

When you generate Oracle WebLogic Server Web services artifacts, SmartUpgrade upgrades the following OC4J Web services to Oracle WebLogic Server 10.3 JAX-RPC Web services:

  • OC4J 10g Release 3 (10.1.3) Web services

  • OC4J 10g Release 3 (10.1.3) EJB 2.1 Web services

  • OC4J 10g Release 3 (10.1.3) EJB 3.0 Web services

  • OC4J 10g Release 2 (10.1.2) Web services

The upgraded Web services use the same contextpath and the context URI as the OC4J 10g Web services. For example, suppose the URI for your OC4J 10g Release 3 (10.1.3) Web services were as follows:

http://locahost:8888/contextpath/soap11
http://locahost:8888/contextpath/soap12

After the upgrade, you should be able to access the same Web services via the following URI on the Oracle WebLogic Server domain:

http://locahost:7001/contextpath/soap11
http://locahost:7001/contextpath/soap12

During the upgrade process, SmartUpgrade automatically updates Web services related deployment descriptors (such as web.xml and weblogic-webservices.xml) and generates "glue code" that allows your upgraded Web services to communicate with your existing remote endpoints.

For more information about the Web services upgrade tasks that SmartUpgrade performs for you, see Section 1.4.2, "Generation of Web Services Artifacts".

You can optionally configure SmartUpgrade to analyze your application specifically to determine the performance impact of the generated glue code. For more information, see Section 4.2.3, "Analyzing the Performance Impact of the Web Services Glue Code Generated by SmartUpgrade".

4.2.3 Analyzing the Performance Impact of the Web Services Glue Code Generated by SmartUpgrade

To upgrade your OC4J Web services to Oracle WebLogic Server, SmartUpgrade generates Java programming code called "glue code," which allows your upgraded Web services to continue to use your existing business logic code while deployed on the new server.

To determine the performance impact of the generated glue code:

  1. Select one of the following options when you use SmartUpgrade to upgrade your application and generate Web services artifacts:

    • If you are using Oracle JDeveloper, select Generate Instrumented Code for Performance Analysis on the OC4J Web Services Upgrade page of the Java EE Upgrade wizard.

    • If you are using the SmartUpgrade command-line interface, use the -evaluate command-line option.

    If you enable this option, then SmartUpgrade instruments the generated wrapper ("glue") code for performance analysis.

    Note that this option is appropriate only for testing the application, and not for production environments.

  2. Perform the upgrade of your application and deploy the application on Oracle WebLogic Server.

  3. After the application is deployed and running successfully on Oracle WebLogic Server, locate the following HTML file in the Oracle WebLogic Server domain directory:

    MW_HOME/user_projects/domains/domain_name/webservice_port_name.html
    
  4. Open the HTML file in a browser.

    The browser displays the Glue Code Performance Analysis page. Immediately after deployment, no data is displayed in each column of the table.

  5. Exercise the Web service to generate some performance data.

    You can test the Web service using the Oracle WebLogic Server Administration Console or the Oracle Enterprise Manager Fusion Middleware Control.

    For more information, see "Testing Your Web Services" in the Oracle Fusion Middleware Security and Administrator's Guide for Web Services.

  6. Refresh the browser where the Glue Code Performance Analysis page is displayed.

    Each time you test the Web service, an entry is added to the Glue Code Performance page. Use the data on this page to measure the impact of the glue code on the performance of the Web service.

Note:

When you are finished analyzing the performance metrics, regenerate the application for production environment, by running SmartUpgrade again with the following options:
  • If you are using Oracle JDeveloper, then repeat the process from the start , but do not select Generate Instrumented Code for Performance Analysis.

  • If you are using the command-line interface, then use the -evaluate false option when you run SmartUpgrade.

Figure 4-2 SmartUpgrade Web Services Upgrade - Glue Code Performance Analysis Page

Description of Figure 4-2 follows
Description of "Figure 4-2 SmartUpgrade Web Services Upgrade - Glue Code Performance Analysis Page"