Skip navigation.
Downloads | Product Documentation | Support

Administration Console Online Help

# Deploying Applications and Modules

[Attributes and Console Screen Reference for Deployment]

In the Deployment area of the Administration Console, you deploy new applications and modules—J2EE Applications, EJB modules, Web Applications, Connectors, and Startup or Shutdown classes—to servers and clusters in the domain. Deploying a new application or module involves choosing the files to deploy, selecting target servers or clusters to deploy the files, and (if necessary) copying the files to the Administration Server and each target server.

After you have initially setup and deployed an application or module to one or more servers, you can later stop, deploy, or redeploy the application or module without reconfiguring or re-copying its files. The Deployment area of the Administration Console also enables you to do the following tasks:

- Change the order of deployment for applications and modules.
- Change the targeted servers and clusters for applications and modules.
- Remove an application or module from the domains.

# Tasks

## Preparing Applications and Modules for Deployment

WebLogic Server can deploy applications and modules that are packaged according to the J2EE specifications for Enterprise Applications, Web applications, Web Services, EJB modules, and resource adapters. For each module type, the J2EE specifications and J2EE deployment descriptors define the files required and their location in the directory structure. Modules may also include WebLogic-specific deployment descriptors and, possibly, container classes generated with the WebLogic EJB, RMI, or JSP compilers. See Packaging and Deploying Applications for more information about preparing J2EE application or module files for deployment to WebLogic Server.

Startup and shutdown classes can also be deployed to WebLogic Server instances, but they are not packaged according to the J2EE specifications. You simply identify the class to execute at startup or shutdown.

### Archives and Exploded Archives

WebLogic Server enables you to deploy an application or module either as an archive file (`.jar` file), or as an exploded archive file that contains maintains the same directory structure as the `.jar`. Applications and modules archived as `.jar` files must use the correct file extension for the module type:

- EJBs are packaged as `.jar` files.
- Web Applications are packaged as `.war` files.
- Resource Adapters are packaged as `.rar` files.
- Enterprise Applications are packaged as `.ear` files.
- Web Services are similar to Web Applications, but they can be archived either as `.war` or `.ear` files.

An exploded archive directory contains the same files and directories as a `jar` archive. However, the files and directories reside directly in your file system and are not packaged into a single archive file using the `jar` utility.

Exploded archives are frequently used in a development environment, because they allow you to easily recompile or change parts of the deployment without regenerating a `jar` archive. To target an exploded archive, you select the top-level directory of the application or module, rather than the `jar` archive.

### Summary of Application and Module Types

The following table summarizes the application and module types you can deploy from the Administration Console, including the key distinguishing deployment files.

Table 62-1 Summary of Deployable Modules

Application or Module | Archive Extension | Key J2EE Deployment Descriptor
--- | --- | ---
Enterprise Application | .ear | `META-INF/application.xml`
Enterprise JavaBean Module | `.jar` | `META-INF/ejb-jar.xml`
Web Application | `.war` | `WEB-INF/web.xml`
Web Service | `.ear` or `.war` | WEB_INF/web-services.xml
Connector Module | `.rar` | `META-INF/ra.xml`
Startup or Shutdown Class | n/a | No deployment descriptor (Class file only)

## Selecting a Deployment Staging Mode

The deployment staging mode determines how a module's archive files are made available to server instances that must deploy the module. WebLogic Server provides three different options for staging archive files:

- Stage mode—The Administration Server copies the archive files from their source location to a location on each of the targeted Managed Servers that deploy the archive. For example, if you deploy a J2EE Application to three servers in a cluster, the Administration Server copies the application archive files to each of the three servers. Each server then deploys the J2EE Application using its local copy of the archive files.

Stage mode is the default mode when deploying to more than one WebLogic Server instance.

- Nostage mode—The Administration Server does not copy the archive files from their source location. Instead, each targeted server must access the archive files from a single source directory for deployment. For example, if you deploy a J2EE Application to three servers in a cluster, each server must be able to access the same application archive files (from a shared or network-mounted directory) to deploy the application.

Nostage mode is the default mode when deploying only to the Administration Server (for example, in a single-server domain). You can also select nostage mode if you run a cluster of server instances on the same machine.

- External_stage mode—External_stage mode is similar to stage mode, in that the deployment files must reside locally to each targeted server. However, the Administration Server does not automatically copy the deployment files to targeted servers in external_stage mode; instead, you must manually copy the files, or use a third-party application to copy the files for you.

In general, if you are deploying to a standalone development server, or if all target servers reside on the same machine, select nostage mode. In either case, all of the target servers can access the same set of files for deployment.

If you are deploying to multiple, remote servers in a production environment, use stage mode. Stage mode ensures that each server has a local copy of the deployment files on hand, even if a network outage makes the Administration Server unreachable. If you do not want the Administration Server to copy the files for you, use external_stage mode instead and ensure that the files are copied before deployment.

## Setting the Application Staging Mode

When you deploy an application or module using the Administration Console, the staging mode is configured for the application or module itself. This staging mode overrides any mode configured for the target server(s).

To set the staging mode for an application or module, simply follow the instructions under Deploying New Applications and Modules. Note that the Administration Console does not enable you to set the external_stage mode at the application level. If you wish to deploy an application or module with in external stage mode, use the `weblogic.Deployer` utility. See Packaging and Deploying Applications for more information.

## Setting the Server Staging Mode

The server staging mode specifies the default deployment mode for a server if none is specified at deployment time. For example, the server staging mode is used if you deploy an application or module using `weblogic.Deployer` and you do not specify a staging mode.

To set the server staging mode:

1. Expand the Servers node in the left pane.
2. Select the name of the server instance that you want to configure.
3. Select the Configuration->Deployment tab in the right pane to display the current staging mode.
4. Select stage, nostage, or external_stage from the Staging Mode menu. These modes correspond to the staging modes described in Selecting a Deployment Staging Mode, and apply only to the selected server instance.
5. Enter a path in the Staging Directory Name attribute to store staged deployment files. The path is relative to the root directory of the selected server.
6. If you are configuring the staging mode for the Administration Server, also specify an Upload Directory Name, relative to the server's root directory. This is the directory where the Administration Server stores uploaded files for deployment to servers and clusters in the domain.
7. Click Apply to change the staging mode and directory.

## Deploying New Applications and Modules

The Administration Console provides Deployment Assistants to help you deploy each type of application or module. After you have deployed a new application or module, you can redeploy, stop, and later deploy using Administration Console controls.

To deploy a new application or module using a Deployment Assistant:

1. Expand the Deployments node in the left pane to display the different deployment types.
2. In the left pane, select the type of application or module that you want to deploy. The available deployment types are:

- Applications—Enterprise Applications or Web Services packaged as `.ear` files or directories
- EJB Modules—Enterprise JavaBeans
- Web Application Modules—Web Applications or Web Services packaged as `.war` files or directories
- Connector Modules—Resource adaptors
- Startup & Shutdown—Startup classes and Shutdown Classes

3. In the right pane, select the Configure a new module link, where module is the type of application or module you want to deploy. This initiates the Deployment Assistant for the module.
4. Follow the instructions provided by the deployment assistant to select the deployment files, target the files to individual servers, and deploy the application or module. If you need more help with a particular Deployment Assistant step, click the help icon on the corresponding page for more information.

## Changing the Order of Deployment

By default, WebLogic Server deploys Enterprise Applications, EJBs, Web Applications, and Web Services deployed immediately after its subsystems initialize at boot time. Startup classes are deployed and run after application modules have been deployed.

The actual deployment order of modules is determined by their Load Order attribute. By default, new applications and modules are configured with a Load Order value of 100. Modules with a lower Load Order value are deployed before those with a higher value during startup. Modules with the same Load Order value are deployed in alphabetical order using the deployment name.

Follow these steps to view or change the deployment order of modules deployed to the WebLogic Server domain:

1. Select the Deployments node in the left pane. The right pane displays all modules configured for deployment in the domain, listed in their current deployment order.
2. Select the Change button next to a module name to display the Change Deployment Order page.
3. Enter a new value in the Load Order field, and click Apply to apply your changes. The again displays the complete list of modules configured for deployment in the domain.

To change the deployment order of a Startup class, follow the instructions in Configure a Startup or Shutdown Class.

## Changing the Target Servers for a Deployment

After you have deployed a new application or module to one or more servers, you can add or remove servers from the target list to change the scope of the deployment. To change the list of target servers for a configured application or module:

1. Expand the Deployments node in the left pane to display the different deployment types.
2. In the left pane, select the type of application or module that you want to reconfigure.
3. In the right pane, select the name of the deployment you want to reconfigure.
4. Click the Targets tab in the right pane to display the list of servers and clusters currently assigned to the deployment.
5. Check or uncheck boxes next to individual server names to add or remove the deployment from those servers.
6. Click Apply to apply your changes.

## Deploying, Redeploying, and Stopping Applications

After you have deployed a new application or module to one or more servers, you can use the Administration Console to redeploy, stop, or deploy the module files on those servers. To deploy, redeploy, or stop an application or module:

1. Expand the Deployments node in the left pane to display the different deployment types.
2. In the left pane, select the type of application or module that you want to deploy, redeploy, or stop.
3. In the right pane, select the name of the deployment you want to deploy, redeploy, or stop.
4. Click the Deploy tab. The Deploy tab shows the current status of each module contained in the selected deployment. For example, if you selected a J2EE application, the Deploy tab shows the status and controls for each EJB Module and Web Application contained in the J2EE Application deployment.

The available controls (Deploy, Redeploy, or Stop) depend on the current status of the module:

- Deploy makes the module available for client use. This control is available when the module is inactive on the specified server.
- Redeploy updates the deployment with the available module files. This control is available when the module is active on the specified server.
- Stop makes the module unavailable to clients. This control is available when the module is active on the specified server.

5. To deploy, redeploy, or stop a single module, click the corresponding control next to the module entry in the table. To deploy, redeploy, or stop all available modules, click the Deploy All, Redeploy All, or Stop All button at the bottom of the table.

## Removing an Application or Module from the Domain

A deployed application or module remains available in the domain to redeploy, stop, or deploy, until you explicitly remove it. If you no longer want to deploy an application to servers in the domain, use the following steps to remove it from the domain:

1. Expand the Deployments node in the left pane to display the different deployment types.
2. In the left pane, select the type of application or module that you want to deploy, redeploy, or stop.
3. In the left pane, right-click the name of the deployment you want to remove, and select Delete module_name... from the menu.
4. In the right pane, select Yes to remove the application or module.

If you later want to redeploy the removed application or module, follow the instructions in Deploying New Applications and Modules to identify the deployment files and deploy it to servers in the domain.