7 Deploying Applications in WebLogic Server

Application deployment refers to the process of making an application or module available for processing client requests in a WebLogic Server domain.

This chapter includes the following topics:

Overview of the Deployment Process

Application deployment encompasses several discrete tasks, such as preparing and configuring applications for deployment, exporting and redeploying applications to new environments, and managing deployed applications.

Java EE 7 Deployment Implementation

WebLogic Server implements the Java EE 7 specification. Java EE 7 includes a deployment specification, JSR-88, that describes a standard API used by deployment tools and application server providers to configure and deploy applications to an application server.

WebLogic Server implements both the JSR-88 Service Provider Interface (SPI) plug-in and model plug-in to comply with the Java EE deployment specification. You can use a basic Java EE deployment API deployment tool with the WebLogic Server plug-ins (without using WebLogic Server extensions to the API) to configure, deploy, and redeploy Java EE applications and modules to WebLogic Server. The WebLogic Server configuration generated by a Java EE deployment API configuration process is stored in a deployment plan and one or more generated WebLogic Server deployment descriptor files, as shown in Figure 7-1.

Figure 7-1 Configuring Applications with the Java EE Deployment API

Description of Figure 7-1 follows
Description of "Figure 7-1 Configuring Applications with the Java EE Deployment API "

WebLogic Server deployment descriptors are generated as needed to store WebLogic Server configuration data.

The WebLogic Server deployment plan generated by a Java EE deployment API deployment tool identifies the WebLogic Server deployment descriptors that were generated for the application during the configuration session.

Although the Java EE deployment API provides a simple, standardized way to configure applications and modules for use with a Java EE-compliant application server, the specification does not address many deployment features that were available in previous WebLogic Server releases. For this reason, WebLogic Server provides important extensions to the Java EE deployment API specification to support capabilities described in WebLogic Server Deployment Features in Deploying Applications to Oracle WebLogic Server.

Fast Track Deployment Guide

To support application development environments, WebLogic Server provides a robust set of utilities and tools that you can use to deploy your applications quickly. The following topics provide basic instructions for quickly deploying Java EE applications and modules, JSP and HTML files, and Coherence modules. They also provide pointers to tools for system administrators. These deployment procedures are recommended for use in development environments only; the procedures are not recommended for use in production environments. For additional information about developing and deploying applications on WebLogic Server, see Developing Applications for Oracle WebLogic Server and Deploying Applications to Oracle WebLogic Server.

Java EE Deployment

To deploy a Java EE application or module:

  1. Make sure that the Java EE application or module does not require additional resources such as named JDBC data sources or JMS queues. If the application requires external resources, you must configure them in the target WebLogic Server domain before deploying the application.
  2. Copy the archive file or exploded archive directory for the Java EE application or module into the /autodeploy directory of the examples server domain directory, ORACLE_HOME/user_projects/domains/wl_server/autodeploy.
  3. Start the Examples WebLogic Server instance.
  4. Access the application using either a Java client or the configured URI for the application.
Auto-Deployment

When running in development mode, WebLogic Server automatically deploys applications copied into the /autodeploy subdirectory of the domain directory. Auto-deployment is a simple and quick method of deploying an application for testing or evaluation. See Auto-Deploying Applications in Development Domains in Deploying Applications to Oracle WebLogic Server.

Deploying Multiple Applications

When you use the WebLogic Server Administration Console to deploy multiple applications, upon installing the applications, they are listed in the Console's Deployments page in the "distribute Initializing" state. After activating changes, they are listed in the "Prepared" state. To deploy the applications, select the application names on the Deployments page and click Start.

System Administrator Tools

System Administrators can use the following tools to get started:

  • WebLogic Server Administration Console

    The WebLogic Server Administration Console is a browser-based web application that allows you to configure and monitor your WebLogic Server domain, server instances, and running applications and their associated resources. You can also use the WebLogic Server Administration Console to create new server instances and clusters and tune application descriptors. See Oracle WebLogic Server Administration Console Online Help.

    After you log into the Console using the credentials you provided during installation, click the Help button or How do I ...? links for additional information.

  • Configuration Wizard

    Use the WebLogic Server Configuration Wizard to create new domains, and to create templates for automating domain configuration. See Creating WebLogic Domains Using the Configuration Wizard.

JSP/HTML Deployment

To deploy a simple JSP or HTML file:

  1. Make sure your JSP file does not reference a tag library or other external resources—such resources require additional deployment steps that are beyond the scope of these Fast Track procedures. HTML files do not have this restriction.
  2. Copy your JSP or HTML file into the EXAMPLES_HOME/wl_server/examples/build/mainWebApp directory, where EXAMPLES_HOME represents the directory in which the WebLogic Server code examples are configured. By default, this directory is ORACLE_HOME/wlserver/samples/server.
  3. Start the Examples WebLogic Server instance.
  4. In a web browser, request the JSP or HTML file using the following URL:

    http://localhost:port/myFile

    where:

    localhost is the host name of the machine running WebLogic Server.

    port is the port number where WebLogic Server is listening for requests (7001 by default).

    myFile is the full name, including the .jsp or .html extension, of the JSP or HTML file you copied in step 2.

The JSP or HTML file has been automatically deployed from a directory preconfigured to target the Examples Server. mainWebApp is deployed by default and you can place your own JSP and HTML files into the mainWebApp exploded directory in order to quickly view or test them.

Coherence Deployment

WebLogic Server supports the deployment of Coherence applications that are packaged as Grid ARchive (GAR) modules. GAR modules contain the artifacts that are required for a Coherence application. GAR modules are deployed as standalone modules, packaged within enterprise applications, and as shared libraries. For details on packaging and deploying Coherence applications, see Deploying Coherence Applications in Developing Oracle Coherence Applications for Oracle WebLogic Server.