bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Deploying WebLogic Server Applications

 Previous Next Contents View as PDF  

Overview of WebLogic Server Deployment

The following sections provide a basic overview of key BEA WebLogic ServerTM deployment topics:

 


Deployable Modules

A deployable module refers to a J2EE application or J2EE module that has been organized according to the J2EE specification. For each module type, the J2EE specification defines both the required files and their location in the directory structure of the module. Modules may include Java classes for EJBs and servlets, resource adapters, Web pages and supporting files, XML-formatted deployment descriptors, and JAR files containing other modules. J2EE does not specify how an application is deployed on the target server—only how a standard module is organized.

Module Types

J2EE provides specifications for creating the following module types: Enterprise Applications, Web applications, Web Services, EJB modules, and resource adapters. For more information on a particular module type, refer to the J2EE 1.4 specification at: http://java.sun.com/j2ee/download.html#platformspec.

Enterprise Application

An Enterprise Application consists of one or more of the following components:

Enterprise Applications are packaged as a JAR file with an .ear extension. An EAR file contains all of the JAR, WAR, and RAR component archive files for an application as well as the XML descriptor that describes the bundled components.

Web Application

A Web Application always includes the following files:

Web Applications may also contain JSP tag libraries, static .html and image files, and a weblogic.xml deployment descriptor, which describes WebLogic Server-specific elements for Web Applications.

Enterprise JavaBean

Enterprise JavaBeans (EJBs) are reusable Java components that implement business logic and enable you to develop component-based distributed business applications. EJB module are packaged as archive files having a .jar extension. The archive file or exploded archive directory for an EJB contains the compiled EJB classes, container classes, and XML deployment descriptors for the EJB. See Programming WebLogic Server Enterprise JavaBeans for more information on the different types of EJBs.

Resource Adaptor

A Resource Adaptor (also referred to as a connector) adds Enterprise Information System (EIS) integration to the J2EE platform. Resource Adaptors are packaged as .rar archive files, and ra.xml deployment descriptor. Connectors deployed on WebLogic Server may also include a weblogic-ra.xml deployment descriptor that specifies WebLogic Server features. See Programming WebLogic Server J2EE Connectors for more information.

XML Deployment Descriptors

A key file that defines each J2EE module type is its XML deployment descriptor. The deployment descriptor an XML document that defines certain runtime characteristics for the module. By editing the XML deployment descriptor, you modify runtime behavior for the module without having to recompile code or reassemble to module itself; the new behavior is read from the descriptor file and implemented when you deploy the module. For example, the deployment descriptors for an EJB module allow you to specify transactional behavior for the EJB when you actually deploy the EJB to a server.

J2EE defines the organization and content of required XML deployment descriptors for each module type. In addition, you can specify optional WebLogic Server XML deployment descriptors to configure deployment behavior in WebLogic Server. These deployment descriptors enable you to maintain the portability of the original J2EE module while utilizing features only available in WebLogic Server.

Table 1-1 lists the types of modules and their associated J2EE-standard and WebLogic-specific deployment descriptors.

Table 1-1 J2EE and WebLogic Deployment Descriptors

Component or
Application

Scope

Deployment Descriptors

Web Application

J2EE

web.xml

WebLogic

weblogic.xml

Enterprise Bean

J2EE

ejb-jar.xml

WebLogic

weblogic-ejb-jar.xml

weblogic-cmp-rdbms-jar.xml

Resource Adapter

J2EE

ra.xml

WebLogic

weblogic-ra.xml

Enterprise Application

J2EE

application.xml

WebLogic

weblogic-application.xml

Client Application

J2EE

application-client.xml

WebLogic

client-application.runtime.xml

Deployment descriptors are either created manually, or are automatically generated using WebLogic Server Java-based utilities. When you receive a J2EE-compliant JAR file from a developer, it should already contain the J2EE-defined and WebLogic Server deployment descriptors. The Administration Console allows you to modify key deployment descriptor elements in a production environment, without editing the XML by hand.

 


Deployment Files

WebLogic Server allows you to deploy modules either as a single archive file, or as a directory that contains the same contents of the archive file.

Archive Files

In most production environments, you will receive a deployable module as an archive file. An archive file is a single file that contains all of a J2EE module's classes, static files, directories, and deployment descriptor files. Archive files are created by using the jar utility to package the top-level directory of a J2EE module.

Modules that are packaged using the jar utility have specific file extension depending on the module type:

In most cases, you will deploy the archive file itself with no additional preparation.

Exploded Archive Directories

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.

You may need to deploy a module as an exploded archive directory, rather than a single archive file, in the following circumstances:

If you choose to deploy an exploded archive directory, use the jar utility to unpack the archive file. For example:

jar xvf myejb.jar

If you are unpacking an Enterprise Application that contains other archive files (.EJB or .WAR files), you will need to expand each archive file contained in the .EAR file as well.

Location of Files

To deploy a new archive or exploded archive directory, the file(s) must be accessible by the Administration Server for your domain. This means they must reside on the Administration Server machine, or they must be available via a remote, network-mounted directory.

When using the Administration Console to deploy new modules, you have the option to upload files to the Administration Server machine if they are not otherwise available.

 


Deployment Targets

Deployment Targets are the server instances and clusters to which you deploy a module. During the deployment process, you select the list of targets from the available servers and clusters configured in your domain. You can also change the target list at any time after you have deployed a module.

If you are deploying to a cluster of WebLogic Server instances, by default the deployment targets all server instances in the cluster. This corresponds to homogenous module deployment, recommended in most clusters. If you want to deploy a module only to a subset of servers in the cluster (if you want to "pin" a module to one or more servers), you can also select individual server names. This type of deployment is less common, and should be used only in special circumstances where pinned services are required. See XREF for more information.

 


Deployment Names

When you deploy a new module to one or more WebLogic Server instances, you specify a deployment name to describe the deployment files, target servers, and other configuration options you selected. You can later redeploy or stop the module on all target servers by simply using the deployment name. The deployment name saves you the trouble of re-identifying the deployment files and target servers when you want to work with the module across servers in a domain.

 


Advanced Deployment Topics

In addition to the basic deployment concepts described in this section, you can perform more advanced tasks such as updating portions of a deployment, or utilizing special deployment modes. Advanced deployment tasks and concepts are described in Advanced Deployment Topics.

 

Back to Top Previous Next