Skip Headers
Oracle® SOA Suite Developer's Guide
10g (10.1.3.1.0)

Part Number B28764-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

11.3 Deploying the Application with Oracle Enterprise Manager Application Server Control

You can deploy, undeploy, or redeploy an application or a module using Oracle Enterprise Manager Application Server Control console.

The Application Server Control Console is installed and configured automatically when you install OC4J using the Oracle Universal Installer. The console is started with all other installed Oracle Application Server components, using the OPMN command-line tool, opmnct1, which is installed in the ORACLE_HOME/opmn/bin directory on each server node. Start all the installed components by issuing the following command:

http://ohs_host_address:port/em

where:

11.3.1 How to Deploy the Application

All applications in the SOA infrastructure that use an archive file (.ear or .war) can be deployed using Enterprise Manager Application Server Control console. This console has a three-page deployment wizard that provides a streamlined, user-friendly deployment process.

You can deploy a new application, module, or standalone resource adapter. When you install or create a new OC4J instance, two applications are automatically deployed to the OC4J instance:

  • The default application (default): This is the parent application for all applications that you deploy on the OC4J instance. All applications deployed on an OC4J instance inherit the attributes and properties of the default application.

  • The Application Server Control application (ascontrol): The ascontrol application represents the Application Server Control, which is automatically deployed on all OC4J instances like any other J2EE application.


Note:

If the HTTP session times out due to browser inactivity while you are using the deployment wizard, you will have to restart the deployment process.

To deploy the application:

  1. Navigate to the Cluster Topology page as shown in Figure 11-4.

    Figure 11-4 Cluster Topology

    Description of Figure 11-4 follows
    Description of "Figure 11-4 Cluster Topology"

  2. Click the link for the target instance you want to deploy the application to.

    The Home page for the OC4J instance is displayed as shown in Figure 11-5.

    Figure 11-5 OC4J Home Page

    Description of Figure 11-5 follows
    Description of "Figure 11-5 OC4J Home Page"

  3. Click Applications.

  4. Click Deploy.

    The Deploy: Select Archive page is displayed as shown in Figure 11-6.

    Figure 11-6 Deploy: Select Archive

    Description of Figure 11-6 follows
    Description of "Figure 11-6 Deploy: Select Archive"

  5. Select the archive to upload to the OC4J server in the first page of the wizard. The archive file that you select can be a J2EE application (EAR file), web module (WAR file), EJB module (EJB JAR file) or resource adapter module (RAR file). Enter the local path to the archive file as follows:

    /applications/soademo/soademo.ear (On Unix)
    
    \soademo\soademo.ear (On Windows)
    
    

    You can also click Browse and select the location of the file on your local disk or on the server where the OC4J instance is running.

  6. Optionally, you can specify a deployment plan.

    The deployment plan is an XML file that consolidates all the OC4J-specific configuration data present in multiple OC4J-specific deployment descriptor files. This deployment plan can be applied to the archive or used as a template for a new deployment plan.

  7. Select the default option to automatically create a deployment plan and click Next. You will see the second page of the deployment wizard, the Deploy: Application Attributes page as shown in Figure 11-7.

    Figure 11-7 Deploy: Application Attributes

    Description of Figure 11-7 follows
    Description of "Figure 11-7 Deploy: Application Attributes"

  8. The type of archive file being deployed and the location is displayed. If you selected an existing deployment plan, the name and location of the deployment plan is displayed. This field is empty if you selected the default option, which is to create a new deployment plan based on the deployment descriptors in archive file.

  9. Enter a name for the application you are about to deploy. This name can contain spaces and will identify this application in the list of applications on the OC4J Applications page.

  10. Select the application that will used as the parent application for the application you are about to deploy.

    For example, you can select the default application, which is available in every OC4J instance. Child applications see the namespace of their parent applications. This setting is used to share services, such as EJBs, among multiple applications.

  11. If deploying a web application, bind the application to the web site that will be used to access it. Select a web application from the drop-down menu.

    A <web-app> element is added to the specified web site XML file (for example, http-web-site.xml), indicating the application name, the web application name, and the context path. For example:

    <web-app application="utility"
      name="utility_web"
      root="/utilroot"
      load-on-startup="false"
      max-inactivity-time="no shutdown"
    shared="false"/>
    
    
  12. Finally, you can view or modify the context root for each of the web modules packaged within the application you are deploying.

    The Web module context root is appended to the URL used to access the application through a Web browser. For example, if you enter the context root as /soademo, the module can be accessed could be accessed with the following URL:

    http://node1.company.com:777/soademo
    
    
  13. Click Next to go to the next step in the Deployment Wizard.

  14. You will see the Deploy: Deploy Settings page as shown in Figure 11-8.

    Figure 11-8 Deploy: Deployment Settings

    Description of Figure 11-8 follows
    Description of "Figure 11-8 Deploy: Deployment Settings"

  15. Click Deploy to deploy the application.


    Note:

    When you click Deploy, the deployment plan is sent to the OC4J server with the archive. The deployment process will continue even if the Web browser is closed.

11.3.2 What Happens When You Deploy the Application

When you deploy an application packaged within an .ear file, the following occurs:

  1. If the application is being redeployed, the existing installation is first undeployed from OC4J.

  2. OC4J copies the EAR file to the master deployment directory, which defaults to the ORACLE_HOME/j2ee/home/applications/ directory.

  3. OC4J opens and parses the application.xml file packaged within the .ear file. This file is a standard J2EE descriptor that lists all of the modules contained within the .ear file. OC4J notes these modules and initializes the EAR environment.

  4. OC4J reads the module deployment descriptors for each module type, Web module (WAR), EJB module, connector module, or client module into memory. The JAR and WAR file environments are also initialized.

  5. OC4J reacts to the configuration details contained in both the J2EE deployment descriptors and any OC4J-specific deployment descriptors. OC4J notes any J2EE component configurations that require action by OC4J, such as wrapping EJBs with their interfaces.

  6. OC4J writes out new OC4J-specific configuration files to the ORACLE_HOME/j2ee/home/application-deployments/app_name directory, according to the contents of the deployment plan. Note that if one or more OC4J-specific deployment descriptors were supplied, you may notice that OC4J added additional elements to the generated files.

    Any generated classes, such as EJB interface wrapper classes, are compiled and put into new subdirectories under this directory. For example, EJB wrapper classes are generated within an archive named deployment-cache.jar within the ORACLE_HOME/j2ee/home/application-deployments/app_name/jar_name.jar/ directory, where jar_name.jar corresponds to the name of a deployed EJB JAR.

  7. Finally, OC4J updates the OC4J server.xml configuration file with the notation that this application has been deployed.

11.3.3 How to Deploy to OC4J Instances Within a Cluster

The Application Server Control Console enables you to deploy an application to a specific OC4J instance or to a "group" of OC4J instances within an Oracle Application Server Cluster. A group is a synchronized set of OC4J instances that belong to the same cluster topology. Configuration operations can be executed simultaneously on all OC4J instances in the group.

To deploy the application to a group of OC4J instances within a cluster:

  1. Click Cluster Topology on the Application Server Control Console Home page. You will see the Cluster Topology page.

    This page displays the following: You can see that there is a group named soa_group listed under the Groups section in the Cluster Topology page.

    • All Oracle Application Server instances that are currently part of the cluster.

    • The active OC4J instances within each Oracle Application Server instance.

    • The applications deployed into each OC4J instance.

  2. To deploy to a group of OC4 instances, click the common instance name shared by the group under Groups at the bottom of the page.

  3. Deploy the application by following the instructions as listed in Section 11.3.1, "How to Deploy the Application".