Downloads | Product Documentation | Support secure search Documentation

OTN Home

Oracle Forums

C ommunity

eDocs Home > BEA WebLogic Server 8.1 Documentation > Deploying WebLogic Server Applications > Overview of WebLogic Server Deployment

Deploying WebLogic Server Applications

Overview of WebLogic Server Deployment
The following sections provide a basic overview of key BEA WebLogic ServerTM deployment topics: Deployment Units Deployment Files Deployment Targets Staging Modes Deployment Names Deployment Tools Security Roles Required for Deployment

open in browser PRO version

Are you a developer? Try out the HTML to PDF API

resource adapters. Deployment Units A deployment unit refers to a J2EE application (an Enterprise Application or Web Application) or a standalone J2EE module (an EJB or Resource Adapter) that has been organized according to the J2EE specification and can be deployed to WebLogic Server.Document Scope and Audience This document is written mainly for Administrators who want to deploy Java 2 Platform. Web pages and supporting files. Also see Deployment Topics for Developers on page 4-13 for information about deployment features that apply to development environments. It also assumes that you have one or more application module archive files that have been tested and are ready to deploy on a production server. see Developing WebLogic Server Applications. Enterprise Edition (J2EE) applications or application modules to WebLogic Server. the J2EE specification defines both the required files and their location in the directory structure of the application or module. XML-formatted deployment descriptors. which is generally characterized by multiple WebLogic Server instances or clusters running on multiple machines. which include Enterprise JavaBeans and resource open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. For each type of deployment unit. If you are an engineer and need to deploy or package applications in a development environment. J2EE does not specify how a deployment unit is deployed on the target server—only how standard applications and modules are organized. Deployment units may include Java classes for EJBs and servlets. WebLogic Server supports deployments that are packaged either as archive files using the jar utility. This document assumes that you are working in a production . or as exploded archive directories. Standalone Modules J2EE provides specifications for creating standalone modules. and even other modules.

A Web Service module may also include EJBs that implement the Web Service. which are not part of the J2EE specification. refer to the J2EE 1. such as customer relationship management systems. Resource Adapter A Resource Adapter (also referred to as a connector) adds Enterprise Information System (EIS) integration to the J2EE platform. Connectors provide a system-level software driver that WebLogic Server can use to connect to an EIS. but are generally deployed as exploded archive directories. See Programming WebLogic Server J2EE Connectors for more information. and XML deployment descriptors for the EJB. and if necessary. but do not necessarily provide a direct user . Note: Resource Adapters cannot be deployed as exploded archive directories.3 specification at: http://java. EJB modules are packaged as archive files having a . Enterprise JavaBean Enterprise JavaBeans (EJBs) are reusable Java components that implement business logic and enable you to develop component-based distributed business applications. order-processing systems. the native components required to interact with the EIS. WebLogic Server also supports deploying Web Services modules. The archive file or exploded archive directory for an EJB contains the compiled EJB classes. Standalone modules generally provide parts of a larger.html#platformspec. Web Services Web Services are a type of service that can be shared by and used as components of distributed Web-based applications. open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. See Programming WebLogic Server Enterprise JavaBeans for more information on the different types of EJBs. For more information on a particular module type. optional generated classes.adapter modules.jar extension. distributed application. Connectors contain both the Java classes.sun. and so A Web Service module is a virtual module that includes both a Web Application and a Web Service deployment descriptor at minimum. See Programming WebLogic Web Services for more information. They commonly interface with existing back-end applications.

xml deployment descriptor. An exploded EAR directory contains all of the JAR. but is generally deployed as an exploded EAR directory. Enterprise Application An Enterprise Application consists of one or more of the following J2EE applications or modules: Web Applications Enterprise Java Beans (EJB) modules Resource Adapter modules An Enterprise Application is packaged as a JAR file with an . Web Application A Web Application always includes the following files: A servlet or JSP page.ear extension. See Developing WebLogic Server Applications for more information.html and image files. Enterprise Applications.xml deployment descriptor. Applications generally include one or more standalone J2EE modules to provide a logical service. and RAR modules (also in exploded format) for an application as well as the XML descriptor files for the Enterprise Application and its bundled applications and modules. along with any helper . a J2EE standard XML document that configures the contents of a WAR file.Deployable Applications J2EE also defines several different types of deployable applications: Web Applications.jar files. A web. See Developing Web Applications for WebLogic Server for more information. which configures WebLogic Server-specific elements for Web Applications. open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. static . WAR. and a weblogic. Web Applications may also contain JSP tag libraries. and may also provide a direct user interface to the applications' contents. supporting classes and . and client applications.

Client modules in an EAR are defined using the J2EE standard application-client. you modify runtime behavior for the deployment unit without having to recompile code or rebuild the deployment unit itself. WebLogic Server deployment descriptors enable you to maintain the portability of the original J2EE module while utilizing features only available in WebLogic Server. the WebLogic deployment descriptors for an EJB allow you to specify the number of beans to keep in the cache when you deploy the EJB to a server. . you identify the servers that will execute the class. For example.Client Application Archives The J2EE specification provides the ability to include a client application archive file within an Enterprise Application. This enables both the server-side and client-side components to be distributed as a single unit. because you do not specify any actual deployment files.runtime. The deployment process for startup and shutdown classes differs from other deployable units. J2EE defines the organization and content of required XML deployment descriptors for each deployment unit. the new behavior is read from the descriptor file and implemented when you deploy the application or module. you can specify optional WebLogic Server XML deployment descriptors to configure WebLogic-specific behavior for handling the deployment. In addition. See Startup and Shutdown Classes in the Administration Console Online Help for more information. Instead. Startup and Shutdown Classes Startup and shutdown classes are Java classes that you can configure to load and execute when you start up or gracefully shut down a server.xml. open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. you simply change the deployment descriptor. A J2EE client application module contains the Java classes that execute in the client JVM (Java Virtual Machine) and deployment descriptors that describe EJBs (Enterprise JavaBeans) and other WebLogic Server resources used by the client. If you need to change the number of cached beans for performance reasons. XML Deployment Descriptors for Deployment Units A key file that defines each type of deployment unit is its XML deployment descriptor.xml deployment descriptor and an optional WebLogic Server descriptor. and specify the classpath and optional arguments to use for execution. The deployment descriptor is an XML document that defines certain runtime characteristics for the application or module. By editing the XML deployment descriptor.

WebLogic WEB-INF/web-services.xml WebLogic META-INF/weblogic-ra. Table 1-1 J2EE and WebLogic Deployment Descriptors Deployment Scope Unit Web Application J2EE Deployment Descriptors WEB-INF/web.xml Enterprise Bean J2EE META-INF/ . a Web Service module is typically packaged as an Enterprise Application that contains both a Web Application and EJB modules. For this reason.xml WebLogic META-INF/weblogic-application.Table 1-1 lists the types of deployment units and their associated J2EE-standard and WebLogic-specific deployment descriptors. However.xml WebLogic META-INF/weblogic-ejb-jar.xml Are you a developer? Try out the HTML to PDF API open in browser PRO version pdfcrowd.xml Enterprise Application J2EE META-INF/application.xml Web Service J2EE Web Services have no J2EE descriptor.xml Connector J2EE META-INF/ra.xml Client J2EE META-INF/application-client.xml WebLogic WEB-INF/weblogic. Web Services modules generally require J2EE descriptors required for those modules.xml META-INF/weblogic-cmp-rdbms-jar.

When you receive a J2EE-compliant JAR file from a . open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. you receive a deployment unit as an archive file. Enterprise Applications are packaged as . it should already contain the J2EE-defined and WebLogic Server deployment descriptors. which can help you tune the application's run-time behavior and performance. or generate them with WebLogic Server Java-based utilities. Archive Files In most production environments. Deployment units that are packaged using the jar utility have a specific file extension depending on the type: EJBs are packaged as . or as an exploded directory that contains the same contents of the archive file.jar files.rar files. Deployment Files WebLogic Server allows you to store deployment units either as a single archive file.war files. Archive files are typically created by using the jar utility or Ant's jar tool. and Resource Adapters. static files.runtime.Application WebLogic client-application. Web Services can be packaged either as . and deployment descriptor files.ear files or as . Web Applications are packaged as .xml You create deployment descriptors manually. directories. Web Applications. and can contain any combination of EJBs.war files. The Administration Console also enables you to modify key deployment descriptor elements of a deployed application. Resource Adapters are packaged as .ear files. An archive file is a single file that contains all of an application's or module's classes.

A deployment unit should be deployed as an exploded archive directory. In this case. (You cannot edit deployment descriptor values in the console for deployments from archive files. rather than a single archive file. the modules that perform the I/O operations should have a physical filesystem directory in which to work. Exploded Archive Directories An exploded archive directory contains the same files and directories as a jar archive. You are deploying a Web Application or Enterprise Application that contains static files that you will periodically update. in the following circumstances: You want to perform partial updates to a deployed application without redeploying the entire application. Unpacking an Archive File If you have an archive file that you want to deploy as an exploded archive directory. However. deploying Exploded Archive Directories provides some additional redeployment capabilities. you cannot obtain a file when the application is deployed as an archive.) See Dynamically Updating Descriptors for a Deployment Unit for more information. a Web Application that tries to dynamically edit or update parts of the Web Application itself). the files and directories reside directly in your file system and are not packaged into a single archive file with the jar utility. You are deploying a Web Application that performs direct file system I/O through the application context (for example. You want to use the Administration Console to dynamically edit and persist selected deployment descriptor values for the deployment. as per the specification. use the jar utility to unpack the archive file in a dedicated directory. For example: open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. Although you can deploy an archive file directly to WebLogic Server. it is more convenient to deploy the application as an exploded directory. In this .Note: Startup and shutdown classes are not packaged—you simply specify the classpath to use when assigning target servers. because you can update and refresh the static files without re-creating the archive.

and virtual hosts. clusters.ear If you are unpacking an archive file that contains other module archive files (for example. During the deployment process. you must update the URI values specified in application. For example. the file(s) must be accessible by the Administration Server for your domain. an Enterprise Application or Web Service that includes JAR or WAR files) and you want to perform partial updates of those modules. you must modify any references to those modules in the application itself.jar into a /myejb. clusters. This means they must reside on the Administration Server machine.xml and CLASSPATH entries in the manifest. or they must be available via a remote. For example. you have the option to upload files to the Administration Server machine if they are not otherwise available. Deployment Targets Deployment targets are the servers to which you deploy an application or standalone module.mkdir /myapp cd /myapp jar xvf /dist/ file. network-mounted directory.jar subdirectory of the exploded Enterprise Application directory. You can also open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. you must expand the embedded archive files as well. Make sure that you unpack each module into a subdirectory having the same name as the archive . you select the list of targets from the available servers. Note: If you want to use different subdirectory names for the archived modules in an exploded EAR file. unpack a module named myejb. Location of Files To deploy a new archive or exploded archive directory. When using the Administration Console to deploy a module for the first time. Files are uploaded to the location specified by the Upload Directory Name attribute. and virtual hosts configured in your domain. Valid deployment targets include WebLogic Server instances.

this practice is not recommended. Although you can deploy to the Administration Server in a multipleserver domain. WebLogic Server Instances You can deploy applications and standalone modules to one or more Managed Servers in a domain. which is recommended in most clusters. You select a configured virtual host name as you would a WebLogic Server instance or cluster name during deployment. See Configuring Virtual Hosting in Configuring and Managing WebLogic Server for more information. The Administration Server in a multiple-server domain should be used only for administration purposes.change the target list at any time after you have deployed a module. and should be used only in special circumstances where pinned services are required. Note: If the context root for a Web Application is blank in weblogic. When you use virtual hosting. and you specify which applications are served by each virtual host. See Understanding Cluster Configuration and Application Deployment for more information. This corresponds to homogenous module deployment. This type of deployment is less common. "pin" a module to a servers). by default the deployment targets all server instances in the cluster.xml file and the virtual host is targetted to a open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. Clusters If you are deploying to a cluster of WebLogic Server instances. you can also select the individual server . or to the Administration Server in a single-server domain. If you want to deploy a module only to a single server in the cluster (that is. Virtual Hosts Virtual hosting allows you to define host names to which servers or clusters respond. Note: Pinning a deployment to a subset of server instances in a cluster (rather than a single server) is not recommended and will generate a warning message. you use DNS naming to specify one or more host names that map to the IP address of a WebLogic Server or cluster. The following sections describe target types in more detail.

The target servers then deploy using their local copy of the deployment files. The following table describes the behavior and best practices for using the different deployment staging modes. Table 1-2 Application Deployment Staging Modes Deployment Behavior Staging Mode stage The Administration Server first copies the deployment unit source files to the staging directories of target servers specified by the Staging Directory Name attribute. which must be directly accessible by the Administration Server and target servers. Staging Modes The deployment staging mode determines how deployment files are made available to target servers that must deploy an application or standalone module. nostage mode. Deploying to a single-server domain. and external_stage mode. Deploying small or moderate-sized applications to a cluster. When to Use Deploying small or moderate-sized applications to multiple WebLogic Server instances. the Web Application should be deployed only to the Virtual Host or to the server instance. nostage The Administration Server does not copy deployment unit files. all servers deploy using the same physical copy of the deployment files. Deploying to a cluster on a multi-homed machine. Deploying very large applications to multiple pdfcrowd. WebLogic Server automatically detects changes to a open in browser PRO version Are you a developer? Try out the HTML to PDF API . WebLogic Server provides three different options for staging files: stage mode.server instance. With nostage deployments of exploded archive directories.

(This behavior can be disabled if necessary. the Administrator must ensure that deployment files are distributed to the correct staging directory location before deployment (for example. open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. Deployments that require dynamic update of selected Deployment Descriptors via the Administration Console.) applications to multiple targets or to a cluster where deployment files are available on a shared directory. With external_stage deployments. Instead. by manually copying files prior to deployment). the Administration Server requires a copy of the deployment files for validation purposes.deployment's JSPs or Servlets and refreshes the deployment. Deployments where you want to manually control the distribution of deployment files to target servers. Deploying to domains where third-party applications or scripts manage the copying of deployment files to the correct staging directories. Copies of the deployment files that reside in target servers' staging directories are not validated before deployment. Deployments that do not require dynamic update of selected Deployment Descriptors via the Administration Console (not supported in external_stage mode). Deploying exploded archive directories that you want to periodically redeploy after changing content. external_stage The Administration Server does not copy deployment .

com . Deployment Tools WebLogic Server provides several tools for deploying applications and standalone modules: Administration Console—provides a series of web-based Deployment Assistants that guide you through the deployment process. and changing selected deployment descriptor values while the deployment unit is up open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.Deployments that do not require partial redeployment of application components. the deployment tool selects a default name. Deployment Names When you first deploy an application or standalone module to one or more WebLogic Server instances. see Deployment Staging Modes and Staging Directories in Advanced Deployment Topics. If you do not specify a deployment name at deployment time. and the Administration Console automatically suggests the appropriate mode when you deploy an application or module. Most deployments use either stage or nostage modes. the default deployment name is the name of the top-level directory you deploy. The deployment name saves you the trouble of re-identifying the deployment files and target servers when you want to work with the deployment unit across servers in a domain. and other configuration options you selected. the deployment name is the name of the archive file without the file extension (myear for the file myear. you specify a deployment name to describe collectively the deployment files. target servers. For more information about staging modes.ear). You can later redeploy or stop the deployment unit on all target servers by simply using the deployment name. The Administration Console also provides controls for changing and monitoring the deployment status. For exploded archive directories. For archive files.

weblogic.war. rather than through Ant tasks. Check the scenarios described under Exploded Archive Directories before deploying. In many cases it is more convenient to deploy applications in exploded format rather than archive format. Use the Administration Console when you need to perform basic deployment functions interactively and you have access to a supported browser. wldeploy is an Ant task version of the weblogic.and running. and so forth) when distributing files to different users or environments.jar. and wldeploy Ant task all provide similar functionality for deploying applications: open in browser PRO version Are you a developer? Try out the HTML to PDF API . weblogic.xml file and running Ant to execute the commands. The deployment API allows you to perform deployment tasks programmatically using Java classes.Deployer tool. The Administration Console.Deployer utility. and you want to perform deployment tasks.ear. . You can also use weblogic. You can automate deployment tasks by placing wldeploy commands in an Ant build. .Deployer when you want to automate deployment tasks through shell scripts or batch processes. The applications directory of a server allows you to deploy an application quickly for evaluation or testing in a development environment. Best Practices for Deployment BEA recommends the following best practices when deploying applications: Package deployment files in an archive format (.Deployer when you do not have access to a browser or graphical user interface environment.Deployer—provides a command-line based interface for performing both basic and advanced deployment tasks. Use weblogic.

When redeploying an entire application. only copy the deployment files to the target servers (but do not start the deployment). Note: An application becomes unavailable to clients during redeployment.Deployer in administration environments that use Ant.Deployer to integrate deployment commands with existing administrative shell scripts or automated batch processes. WebLogic Server doesn't guarantee the operation of the application and deployment task if there is an access from the client at open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. wldeploy can also be used in place of . The applications directory is best used for quickly running new applications in a test or temporary. Use weblogic. For example. Use wldeploy. Distribute—for stage mode deployments. all of the application's modules must redeploy successfully or the entire application is stopped. or the exact names of target servers or deployed applications. Deployment Operations The deployment tools provide support for performing these common deployment operations: Deploy—making deployment source files available to target servers and loading classes into classloaders so that applications are available to clients. a module within an EAR. Use wldeploy in conjunction with the split development directory for developing and deploying new applications. rather than shell scripts. or a static file in a Web Application) that is currently deployed and available to clients.Use the Administration Console for interactive deployment sessions where you do not know the exact location of deployment files. rather than the applications directory. if you download a sample application and want to evaluate its functionality. an EAR. to deploy your own applications during development. the applications directory provides a quick way to deploy the application into a development server. Redeploy—updating an deployment unit or part of a deployment unit (for example.

Starting requires that the deployment files be available on target servers as a result of an earlier deployment. Security Roles Required for Deployment The built-in security roles for "Admin" and "Deployer" users allow you to perform deployment tasks using the WebLogic Server Administration Console. Undeploy—stopping a deployment unit and then removing its deployment files and deployment name from target servers. WebLogic Server doesn't guarantee the operation of the application and deployment task if there is an access from the client at this time. Stopping still leaves the deployment files and deployment name available to target servers for subsequent redeployment or starting. redeployment is not recommended for use in a production environment.this time. C ontact BEA | Feedback | Privacy | © 2013 BEA Systems open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd. Start—reloading an application's classes into classloaders and making the application available to clients. For this reason. Stop—unloading an application's classes and making an application unavailable to . Note: An application becomes unavailable to clients during undeployment. See Starting the Administration Console in the Administration Console Online Help for more information about the built-in security roles.

Sign up to vote on this title
UsefulNot useful