Production Redeployment

Purpose

In this OBE tutorial, you will use the weblogic.Deployer command line tool to deploy a new Web application and associate it with an initial version identifier. After testing the application with a Web browser, you will then use the same tool to redeploy a new version of it. Lastly, you'll confirm that your original browser session continues to use the old version, while new clients are directed to the new version.

Time to Complete

Approximately 20 minutes

Topics

This OBE tutorial covers the following topics:

 Overview
 System Requirements
 Deploying a Versioned Application
 Testing the Application
 Redeploying a New Application Version
 Testing Existing and New Application Clients
 Summary
 Related information

 

Viewing Screenshots

 Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: Because this action loads all screenshots simultaneously, response time may be slow depending on your Internet connection.)

Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

Overview

WebLogic's production redeployment strategy involves deploying a new version of an updated application alongside an older version of the same application. WebLogic Server automatically manages client connections so that only new client requests are directed to the new version. Clients already connected to the application during the redeployment continue to use the older version of the application until they complete their work, at which point WebLogic Server automatically retires the older application.

To assign a version identifier to an application, you have two options. You can add a MANIFEST.MF file to the JavaEE enterprise or Web application being deployed that indicates the version. Or alternatively, specify the version at deployment time using the administration console or using the appversion argument of the weblogic.Deployer command-line tool.

Back to Topic List

System Requirements

Make sure that your system environment meets the following requirements:

Software Requirements

Before starting this tutorial, first complete the following prerequisite tutorials:

Installing and Configuring Oracle WebLogic Server
Configuring Oracle WebLogic Server Managed Instances

Minimum Hardware Requirements

Item Specification
Processor Speed 1 GHz
Memory 1 GB
Free Hard Disk Space 500MB

Back to Topic List

Deploying a Versioned Application

Perform the following steps:

1.

Start your administration server and dizzy1 managed server, if not already started. If prompted, enter your domain's administrative username and password.



2.

Download the dizzyHRWeb.zip file that contains the sample JavaEEWeb application dizzyHRWeb.war file.



3.

Open a new command shell. Navigate to the directory <INSTALL_HOME>/wlserver_10.3/server/bin, where <INSTALL_HOME> is the location of your Oracle WebLogic Server installation.


4.

Execute the setWLSEnv script. For example, on Linux, type the following:

source setWLSEnv.sh



5.

Change directories to the location of your dizzyHRWeb.war file.



6.

Deploy the application using weblogic.Deployer:

java weblogic.Deployer -adminurl t3://localhost:7001 -user admin -password welcome1 -deploy -name dizzyHRWeb -source dizzyHRWeb.war -targets dizzy1 -appversion v1

Tip: If your domain's administrative credentials are not admin/welcome1, replace them with your domain's account.
Tip: Make sure you have not locked the administration console prior to running this script.

 

7.

If the application was successfully deployed, you should see a message similar to the following :

Target state: deploy completed on Server dizzy1

Back to Topic List

Testing the Application

Perform the following steps:

1.

Launch a Web browser and access your domain's administration console. The default port is 7001:

http://localhost:7001/console

 

2.

Log into the console using your domain's administrative username and password.



3.

In the Domain Structure panel, click Deployments:

 


4.

Confirm that the state of your dizzyHRWeb (v1) application is Active.

 


5.

Direct your Web browser to the following URL:

http://localhost:7003/dizzyHRWeb

 

 

6.

Do not close this browser window.

Back to Topic List

Redeploying a New Application Version

Perform the following steps:

1.

Download an updated version of dizzyHRWeb.war. Replace the current copy on your local file system.



2.

Redeploy the application using weblogic.Deployer:

java weblogic.Deployer -adminurl t3://localhost:7001 -user admin -password welcome1 -redeploy -name dizzyHRWeb -source dizzyHRWeb.war -appversion v2

  Back to Topic List

Testing Existing and New Application Clients

Perform the following steps:

1.

Refresh your browser. The background color should remain blue.



2.

Restart your browser . Direct it to http://127.0.0.1:7003/dizzyHRWeb. Notice that the background color of this new version is yellow:

 

 

Tip: You may continue to see a cached version of the home page. Click the Refresh button in your browser to bypass the cache, or alternatively try using the real IP address of your machine in the URL.

 

3.

Return to the Deployments page of the administration console.

 

4.

Notice that both application versions are listed, and that the old version is now Retired:

 

 


  Back to Topic List

Summary

In this lesson, you learned how to:

 Use weblogic.Deployer to install and activate a new application with a specific version identifier
 Monitor application versions using the administration console
 Use weblogic.Deployer to update an application with a new version identifier

Related Information

 To ask a question about this OBE tutorial, post a query on the OBE Discussion Forum.

Back to Topic List

 Place the cursor over this icon to hide all screenshots.

Left Curve
Popular Downloads
Right Curve
Untitled Document