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.
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.
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.
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 :
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: