Skip Headers
Oracle® Enterprise Manager Lifecycle Management Administrator's Guide
12c Release 4 (12.1.0.4)

E27046-23
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

21 Deploying / Redeploying / Undeploying Java EE Applications

This chapter explains how you can deploy, undeploy, and redeploy Java EE Applications using Oracle Enterprise Manager Cloud Control (Cloud Control).

In particular, this chapter covers the following:

21.1 Getting Started

This section provides an overview of the steps involved in deploying, redeploying, and undeploying Java EE Applications. The Deploy / Undeploy Java EE Applications Deployment Procedure allows you perform the following operations:

  • Deploy

  • Undeploy

  • Redeploy

Consider this section to be a documentation map to understand the sequence of actions you must perform to successfully provision a Java EE Application. Click the reference links provided against the steps to reach the relevant sections that provide more information.

Table 21-1 Getting Started with Deploying, Undeploying, or Redeploying a Java EE Application

Step Description Reference Links

Step 1

Understanding the Deployment Procedure

Understand the Deployment Procedures offered by Cloud Control to deploy, undeploy, or redeploy a Java EE Application. Know how the Deployment Procedures function, what use cases it covers, and so on.

To learn about the Deployment Procedure, see Section 21.2.

Step 2

Selecting the Use Case

This chapter covers the use cases for deploying, undeploying, and redeploying Java EE Application. Select the use case that best matches your requirements.

Step 3

Meeting the Prerequisites

Before you run the Deployment Procedure, you must meet the prerequisites, such as configuring the Software Library and creating components to be provisioned as part of the Deploy / Undeploy Java EE Application deployment procedure.

To learn about the prerequisites for deploying, undeploying or redeploying Java EE Application, see Section 21.4.

Step 4

Running the Deployment Procedure

Run the Deployment Procedure to successfully deploy, redeploy, or undeploy one or more Java EE applications.

To run the Deploy / Undeploy Java EE Applications Deployment Procedure, follow the steps explained in Section 21.6.


21.2 Deploying, Undeploying, or Redeploying Java EE Applications

This deployment procedure supports deployment of Java EE Applications packaged into .ear, .war, .jar,.rar or .gar files as per Java EE specifications. Administrators can now use Cloud Control to deploy, redeploy, and undeploy one or more Java EE applications and need not drill down into the WebLogic Server or the Fusion Middleware Administration Console to perform these tasks. The Java EE applications need to be pre-configured before you add them to the Cloud Control Software Library. You can deploy a pre-configured Java EE application to one or more WebLogic domains in Cloud Control.

The Java EE Application Provisioning Wizard offers GUI-rich interactive screens that allow you to deploy / redeploy to, or undeploy a pre-configured Java EE application from one or more WebLogic Domains

21.3 Supported Releases

This deployment procedure can be used to deploy, undeploy, or redeploy Java EE Applications to and from WebLogic versions 10.3.1 and later, including 12.1.1, and 12.1.2.

WebLogic versions 8.x and 9.x are not supported.

21.4 Prerequisites

Before running the Deploy / Undeploy Java EE Applications Deployment Procedure, ensure that the following prerequisites are met:

  • Ensure that the Software Library is configured. See Section 2.2 for details.

  • The Java EE Application component must have been created in the Software Library.

  • The Management Agent must be installed on the Administration Server host machine for the WebLogic Domain to which you are deploying, undeploying, or redeploying the Java EE application. Deployment commands are executed from the Administration Server host machine.

  • If a target execution script is to be run as part of the deployment procedure, then the Management Agent must be installed on the Managed Server's host machine where the target execution script is to be run.

    Note:

    A target execution script can be used to set up the required environment or replace tokens in additional files such as property files. The script will be executed on selected targets.
  • The plug-ins required for this deployment procedure must be deployed to the Management Agent on the destination machines.

21.5 Creating a Java EE Application Component

You can create a Java EE Application component which contains the archive, deployment plan, predeploy, postdeploy, target execution scripts, and other files required for deploying the Java EE application.

Note:

If you try to create a Java EE Application component when the Software Library is configured on a physical host, and the Management Agent has been installed on a virtual host, you will see the following error:
An error was encountered during saving entity samples.gar.
Please see the log for details.
oracle.sysman.emSDK.app.exception.EMSystemException

To create a Java EE Application component, follow these steps:

  1. From the Enterprise menu, select Provisioning and Patching, then select Software Library.

  2. Create a folder or select a folder from the Software Library, select Create Entity, then select Component.

  3. From the Create Entity: Component window, select Java EE Application and click Continue.

  4. In the Create Java EE Application: Describe page, enter the Name, Description, and click Next.

  5. In the Create Entity: Select Files page, select one or more files to be associated with the Java EE Application. You can upload files from a storage location in the Software Library. For Software Library to become usable, at least one upload file location must be configured. In the Specify Destination section, click the Browse button in the Upload Location field. Select either of the following:

    • OMS Shared File System: An OMS Shared File System location is required to be shared (or mounted) across all the Oracle Management Server (OMS) hosts. This option is ideal for UNIX systems.

      For single OMS environments, you can configure the Software Library either on the host where the OMS is running or in a shared location, so that it is accessible to all the OMS hosts. For multiple OMS environments, Oracle recommends that you configure the Software Library in a shared location so that the storage is accessible through NFS mount points to all Oracle Management Servers in the environment.

    • OMS Agent File System: An OMS Agent File System location is a location that is accessible to one of the OMS host's Agent. This option is ideal for OMS installed on Windows hosts. By selecting this option for uploading files, you can avoid sharing a location between all participating OMS hosts.

      Credentials must be set before using an OMS Shared File System or OMS Agent File System. For an OMS Shared File System, normal host credentials must set before configuring a storage location. However, for OMS Agent File System location configuration, a credential (preferred or named) has to be specified.

  6. In the Specify Source section, you can add the standard Java EE archive files such as .ear, .war, .jar, .rar, .gar, and other optional files such pre and post-deploy scripts, target execution script, execution plan and additional files. You can either upload each file separately (Individual Files) or upload a zip file (Zip File) that contains the JavaEEAppComp.manifest file. You can upload the files from:

    • Local Filesystem: Click Browse and upload the files from your local system.

    • Agent Filesystem: You can upload the files from a remote filesystem monitored by the Management Agent. Click Browse and select a host machine from the list and click Select. Click Add. The Remote File Browser window is displayed. Click the Login As button and enter the credentials for the host machine. Specify the location in which the files are present, select one or more archive related files and click Add. The selected files are listed in the Current Selection section. Click OK to return to the Create Entity: Select Files page.

  7. The files are listed in the table. Specify the type of the file by selecting the options in the Type field. Click Next.

  8. Review and verify the information entered so far. Click Save and Upload to upload the files and create the Java EE Application component.

21.6 Java EE Applications Deployment Procedure

This section describes the Java EE Application deployment procedure. It covers the following:

  • Deploying a Java EE Application

  • Undeploying a Java EE Application

  • Redeploying a Java EE Application

21.6.1 Deploying a Java EE Application

Follow these steps to deploy a Java EE Application:

  1. From the Enterprise menu, select Provisioning and Patching, then select Middleware Provisioning.

  2. Select the Java EE Application procedure from the list and click Launch. You can also use the following method to launch the deployment procedure:

    • Click Middleware from the Targets menu.

    • Right click on a WebLogic Domain from the list and from the context sensitive menu, select Provisioning, then select Deploy / Undeploy Java EE Applications.

    • In the Deployment Procedure Manager page, select the Java EE Application Provisioning procedure and click Launch.

  3. In the Deploy/Undeploy Java EE Applications: Select Targets page, choose the Deploy operation.

    Figure 21-1 Deploy / Undeploy Java EE Applications: Select Target

    Deploy / Undeploy Java EE Applications: Select Target
  4. Select WebLogic Domains and select the targets on which the Java EE application is to be deployed. Click Add WebLogic Domains. Choose one or more WebLogic domains from the list and click Select.

    Note:

    You can customize the deployment procedure by locking certain features. You can lock an operation, a target, or an application. Before you proceed with the deployment, you must ensure that the selected domains do not have an active configuration lock. If the selected domains are locked, click the Lock icon to unlock the configuration lock.
  5. The selected WebLogic domains are listed in the Targets table. Select the targets (clusters or managed servers) for each domain and click Next.

  6. In the Deploy / Undeploy Java EE Applications: Select Applications page, add the archives and other related files that are to be deployed from the Software Library. Click Add to select one or more archives and other application related files or components from the Software Library. The Add Application popup is displayed. In the Component Name field, enter a file name or a wild card pattern to search for and retrieve components from the Software Library. Select the Show Java EE Application Components Only checkbox to list only the Java EE Application components in the Components in Software Library column. Select the archives and click the right arrow to move them to the Components Selected for Deployment section.

    Figure 21-2 Deploy / Undeploy Java EE Applications: Add Applications

    Deploy / Undeploy Java EE Applications: Add Applications
  7. In the Type field, the type of each component is displayed. The Type can be:

    • Archive: This is the archive file which can be a .ear, .war, .jar, .rar, or .gar file.

      Note:

      If you have selected a .gar archive file, the WebLogic Domain to which the application is being deployed must be 12.1.2.0.0 or higher.
    • Plan: This is an .xml file containing the deployment options for this application.

    • Pre Deploy Script: This is a script containing WLST commands. The Management Agent runs this script on the Administration Server of each WebLogic domain before the application is deployed. You can use this script to create data sources, JMS end points, and any other resources that might be needed by the application that is being deployed.

    • Post Deploy Script: This is a WLST script that is executed by the Management Agent on the Administration Server after the application is deployed. You can use this script to perform any post deployment configuration. For example, if you need to roll back and undo the changes made by the pre deploy script, you can select this option.

      Note:

      The archive, plan, predeploy, and postdeploy scripts can be moved only to the Administration Server.
    • Additional File: You can add one or more files that will be required by the application that are not part of the application archive. These files can be of any type and can be moved only to the selected targets (managed servers and clusters).

    • Target Execution Script: These scripts can be used to set up the required environment or replace tokens in the additional files like property files. These scripts will be executed on selected targets.

  8. In the Location On Target field, for each component, specify the location on the WebLogic Server Host on which the application is to be deployed. This can be an absolute path or relative to the $WLS_HOME for the selected targets.

  9. After selecting the required files for deployment, enter a unique name for the application and specify the Staging Mode which can be:

    • Default: Each server in the WebLogic Domain maintains two attributes which are Staging Mode and StagingDirectoryName. The Staging Mode is the default staging mode for the server and StagingDirectoryName is the location on which the staged files are stored. Select this option to use the default staging mode for all the targets.

    • Stage: Select this option if the archive files should be moved to the destination machine.

    • No Stage: Select this option if the archive files should not be moved to the destination machine.

  10. Select the Deploy this archive as library option if the application needs to be deployed as a shared library. You can select this option if one or more applications need the same set of files.

  11. Select the Start Mode for deployment which can be:

    • Start in full mode (servicing all requests): Select this option to make the deployed application available to all users.

    • Start application in admin mode (servicing only administration requests): If you select this option, the deployed application is available only to the Administrator.

    • Do not start: The application is deployed but not started. You can select this option if any manual post-deployment configuration is required.

  12. Click OK to add the archive and return to the Select Applications page. You can add more archives or click Next to proceed. If you have added more than one archive, select the Skip on Failure checkbox to skip any failed deployments and continue deploying the remaining applications.

  13. Click the Lock icon to lock the fields you have configured.

    Note:

    The Designer can lock the fields after configuring them. This ensures that the Operator can run the deployment procedure with minimal input.
  14. Click Next. Specify the credentials for each domain you have selected, the host on which the Administration Server is running, and the hosts to which the additional files or execution scripts are to be moved. You can choose:

    • Preferred Credentials: This option is selected by default and the preferred credentials stored in the Management Repository are used. This option is available only if it has already been defined in Cloud Control.

    • Named Credentials: A named credential specifies the authentication information for a user and can be a combination of username / password, public and private key pair, and can be used to perform provisioning, patching, run jobs, and other system management tasks.

    For more information on setting up the credentials, see the Enterprise Manager Security chapter in the Enterprise Manager Cloud Control Administrator's Guide.

  15. Click the Lock icon to lock the fields you have configured. These fields cannot be edited once they are locked.

  16. In the Schedule Deployment page, you can schedule the date on which the Java EE Application deployment procedure should be executed.

  17. Click Next. On the Review page, review the details you have provided for the Deployment Procedure. If you are satisfied with the details, then click Submit to run the Deployment Procedure according to the schedule set. If you want to modify the details, click the Edit link in the section to be modified or click Back repeatedly to reach the page where you want to make the changes.

    After you submit the deployment procedure, you will return to the Procedure Activity page where you can view the status of the Deployment Procedure. After the Java EE Application has been deployed, you can search for the target and navigate to the Target Home page.

21.6.2 Redeploying a Java EE Application

Follow these steps to redeploy a Java EE application:

  1. From the Enterprise menu, select Provisioning and Patching, then select Middleware Provisioning.

  2. Select the Java EE Application procedure from the list and click Launch. You can also use the following method to launch the deployment procedure:

    • Click Middleware from the Targets menu.

    • Right click on a WebLogic Domain from the list and from the context sensitive menu, select Provisioning, then select Deploy / Undeploy Java EE Applications.

    • In the Deployment Procedure Manager page, select the Java EE Application Provisioning procedure and click Launch.

  3. In the Select Targets page, choose the Redeploy operation.

    Note:

    Click the Lock icon to lock an operation or the fields you are configuring in any of the pages in the wizard. Once the fields have been locked, the Operator needs to provide minimal input while running the deployment procedure.
  4. Click Add WebLogic Domains to add one or more WebLogic domains. In the list of targets displayed, choose a target and click Select.

  5. The deployment targets are listed in the Targets table. Select the applications that need to be redeployed and click Next.

  6. In the Select Applications page, a list of applications that can be redeployed are displayed. Select an application and click Edit to modify the archive details and other application related files. In the Application Details window, enter a file name or a wild card pattern to search for and retrieve files from the Software Library. Select the archives and click the right arrow to move them to the Components Selected for Deployment section.

  7. In the Type field, the type of each component is displayed. The Type can be:

    • Archive: This is the archive file which can be a .ear, .war, .jar, or .rar file.

    • Plan: This is an .xml file containing the deployment options for this application.

    • Pre Deploy Script: This is a script containing WLST commands. The Management Agent runs this script on the Administration Server of each WebLogic domain before the application is deployed. You can use this script to create data sources, JMS end points, and any other resources that might be needed by the application that is being deployed.

    • Post Deploy Script: This is a WLST script that is executed by Management Agent on the Administration Server after the application is deployed. You can use this script to perform any post deployment configuration. For example, if you need to roll back and ndo the changes made by the pre deploy script, you can select this option.

      Note:

      The archive, plan, predeploy, and postdeploy scripts can be moved only to the Administration Server.
    • Additional File: You can add one or more files that will be required by the application that are not part of the application archive. These files can be of any type and can be moved only to the selected targets (managed servers and clusters).

    • Target Execution Script: These scripts can be used to set up the required environment or replace tokens in the additional files like property files. These scripts will be executed on selected targets.

  8. Review the default location on the target machine on which the component will reside. This can be an absolute path or relative to the $WLS_HOME for the selected targets.

  9. After selecting the required files for deployment, enter a unique name for the application and specify the Staging Mode which can be:

    • Default: Each server in the WebLogic Domain maintains two attributes which are Staging Mode and StagingDirectoryName. The Staging Mode is the default staging mode for the server and StagingDirectoryName is the location on which the staged files are stored. Select this option to use the default staging mode for all the targets.

    • Stage: Select this option if the archive files should be moved to the destination machine.

    • No Stage: Select this option if the archive files should not be moved to the destination machine.

  10. Select the Start Mode for deployment which can be:

    • Start in full mode (servicing all requests): Select this option to make the deployed application available to all users.

    • Start application in admin mode (servicing only administration requests): If you select this option, the deployed application is available only to the Administrator.

    • Do not start: The application is deployed but not started. You can select this option if any post-deployment configuration is required.

  11. Specify the Retirement Policy for the application. You can select:

    • Allow the application to finish its current sessions and then retire: Select this option if all the current sessions should be completed before retirement.

    • Retire the previous version after retire timeout: Specify a timeout period after which the application will be automatically retired.

  12. Click OK to add the archive and return to the Select Applications page. You can add more archives or click Next to proceed. If you have added more than one archive, select the Skip on Failure checkbox to skip any failed deployments and continue deploying the remaining applications.

  13. Click the Lock icon to lock the fields you have configured. These fields cannot be edited once they are locked.

  14. Click Next. Specify the credentials for each domain you have selected, the host on which the Administration Server is running, and the hosts to which the additional files or execution scripts are to be moved. You can choose:

    • Preferred Credentials: This option is selected by default and the preferred credentials stored in the Management Repository are used. This option is available only if it has already been defined in Cloud Control.

    • Named Credentials: A named credential specifies the authentication information for a user and can be a combination of username / password, public and private key pair, and can be used to perform provisioning, patching, run jobs, and other system management tasks.

    For more information on setting up the credentials, see the Enterprise Manager Security chapter in the Enterprise Manager Cloud Control Administrator's Guide.

  15. Click the Lock icon to lock the fields you have configured. These fields cannot be edited once they are locked.

  16. In the Schedule Deployment page, you can schedule the date on which the Java EE Application deployment procedure should be executed.

  17. Click Next. On the Review page, review the details you have provided for the Deployment Procedure. If you are satisfied with the details, then click Submit to run the Deployment Procedure according to the schedule set. If you want to modify the details, click the Edit link in the section to be modified or click Back repeatedly to reach the page where you want to make the changes.

    After you submit the deployment procedure, you will return to the Procedure Activity page where you can view the status of the Deployment Procedure. After the Java EE Application has been deployed, you can search for the target and navigate to the Target Home page.

21.6.3 Undeploying a Java EE Application

Follow these steps to undeploy a Java EE Application:

  1. From the Enterprise menu, select Provisioning and Patching, then select Middleware Provisioning.

  2. Select the Java EE Application procedure from the list and click Launch. You can also use the following method to launch the deployment procedure:

    • Click Middleware from the Targets menu.

    • Right click on a WebLogic Domain from the list and from the context sensitive menu, select Provisioning, then select Deploy / Undeploy Java EE Applications.

    • In the Deployment Procedure Manager page, select the Java EE Application Provisioning procedure and click Launch.

  3. In the Select Targets page, choose the Undeploy operation.

  4. Click Add WLS Domains to add one or more WebLogic domains. In the list of targets displayed, choose a target and click Select.

  5. The deployment targets are listed in the Targets table. When an application is undeployed from the WebLogic domain, select the applications that need to be undeployed and click Next.

  6. Click Next. Specify the credentials for each domain you have selected, the host on which the Administration Server is running, and the hosts to which the additional files or execution scripts are to be moved. You can choose:

    • Preferred Credentials: This option is selected by default and the preferred credentials stored in the Management Repository are used. This option is available only if it has already been defined in Cloud Control.

    • Named Credentials: A named credential specifies the authentication information for a user and can be a combination of username / password, public and private key pair, and can be used to perform provisioning, patching, run jobs, and other system management tasks.

    For more information on setting up the credentials, see the Enterprise Manager Security chapter in the Enterprise Manager Cloud Control Administrator's Guide.

  7. Specify the deployment schedule and click Next.

  8. Review the details and click Undeploy. You will return to the Procedure Activity page where you can check the status.