Sunday, November 18, 2012

WebLogic Server Deployments - Part 1

Overview of WebLogic Deployments

In this post we will discuss about the basic terminology related WebLogic deployments.  The following sections provide a basic over view of Oracle WebLogic Server deployments:
    1. Application Deployment
    2. Deployment Process
    3. Type of Applications that you can deploy
    4. Deployment Files or Units
    5. Deployment Targets
    6. Deployment Types or Methods
    7. Deployment Tools
    8. Deployment Operations
    9. Deployment States
    10. Deployment Phases
    11. Deployment Descriptors
    12. Deployment Plan
    13. Deployment Staging Modes

Application Deployment

It is the process of installing and making an application or module available for processing the client requests in WebLogic Server domain.

Deployment Process

Deploying an application involves the following tasks:
  • Preparing - Choosing whether to package the application as an archived file or keeping it in an exploded directory
  • Configuring - Creating a deployment plan to maintain configuration changes without changing the deployment descriptors (optional)
  • Deploying - Targetting and distributing the application to WebLogic Servers in a domain


Type of Applications that you can deploy

By using WebLogic you can deploy:
  • Web Applications
  • Enterprise Applications
  • J2EE Librarires
  • Web Services
  • JDBC, JMS and Diagnostic Framework modules
  • Resource Adapter
  • EJB Components
  • Client Applicatin Archives

Deployment Units or Deployment Files

A deployment unit refers to a stand-alone J2EE module (ex: EJB or Resource Adapter) or a J2EE application ( such as Web application or Enterprise application) that can be deployed to WebLogic Server.
You can deploy:

  • JAR (JAVA Archive) files
  • WAR (Web Archive) files
  • EAR (Enterprise Archive) files etc.,

 

Deployment Targets

A deployment taregt refers to WebLogic Server instance to which you can deploy an application or stand alone module.In WebLogic you can deploy it on:
  • Admin Server
  • Managed Servers
  • Clusters
  • Virutal Host

Deployment Types of Deployment Methods

  • Auto Deployment
  • Console Deployment
  • Command Line Deployment
  • Side by side deployment or Redeployment

Deployment Tools

  • Administration Console
  • Command Line Utilities 
    • weblogic.Deployer
    • WebLogic Scripting Tool (WLST) 
    • ant scripts etc.,

Deployment Operations

  • install (deploying an application)
  • delete (un-deploying an application)
  • update
  • start 
  • stop

Deployment States

  • New
  • Prepared
  • Admin
  • Failed
  • Active
  • Retired

Deployment Phases

In WebLogic the applications are deployed in two phases:

Prepare Phase of deployment  (First Phase of the deployment)
In the first phase, application components are distributed to the target server instances, and the planned deployment is validated to ensure that the application components can be successfully deployed. During this phase, user requests to the application being deployed are not allowed.

Active Phase of deployment (Second Phase of the deployment)-
In the second phase the application components will fully deployed on the target server instances, and the deployed application is made available to clients.

Deployment Descriptor

It describes how a module or application should be deployed. The deployment configuration for an application or module is stored in three types of XML document: Java EE deployment descriptors, WebLogic Server descriptors, and WebLogic Server deployment plans.

Deployment descriptors are used to

  • Define application defaults such as welcome and error pages
  • Define run-time environment
  • Specify J2EE Security Constraints
  • Define work managers for the applications
  • Set the context root of application etc.,

Deployment Plan

  • It is an optional XML document that resides outside an application archive.
  • It is used to set or override deployment property values defined in applications WebLogic Server deployment descriptor
  • It configures an application for deployment to a specific WebLogic Server environment.

Deployment Staging Modes

The deployment staging mode determines how deployment files are made available to target servers that must deploy an application or standalone module.  WebLogic provides three types of deployment mode options

  • stage mode
  • nostage mode
  • external_stage mode