bea.com | products | dev2dev | support | askBEA |
|
e-docs > WebLogic Server > WebLogic Server 8.1 Upgrade Guide > Upgrading Example Applications to WebLogic Server 8.1 |
WebLogic Server 8.1 Upgrade Guide |
Upgrading Example Applications to WebLogic Server 8.1
This appendix presents examples of application upgrades from earlier versions of WebLogic Server. It contains the following sections:
Note: WebLogic Server 8.1 examples and PetStore are configured to use the default security configuration. It is not possible to run the WebLogic Server 8.1 examples and PetStore using Compatibility security.
Where several versions of WebLogic Server are being discussed, the instructions use version-specific terms for WebLogic home directories.
In this document WL_HOME signifies a root directory of one of your WebLogic Server installations.
For 6.0 WL_HOME=D:\WLS_6.0\wlserver6.0
For 6.1 WL_HOME=D:\WLS_6.1\wlserver6.1
For 7.0 WL_HOME=D:\WLS_7.0\weblogic700
For 8.1 WL_HOME=D:\WLS_8.0\weblogic810
Upgrading the Pet Store Application from WebLogic Server 7.0 to WebLogic Server 8.1
The procedures described below assume that WebLogic Server 7.0 and WebLogic Server 8.1 are both installed.
The procedure involves moving your application domain to a new directory and then updating paths in the config.xml and start scripts.
You may not need to move your domain. BEA Systems recommends that application domains reside outside the WebLogic Server installation directory.
Path="WL_HOME\samples\server\stage\petstore\petstore.ear" TwoPhase="true">
Path="c:\petstorefrom70to81\server\stage\petstore\petstore.ear" TwoPhase="true">
set JAVA_HOME=WL_HOME\jdk131_03
set SAMPLES_HOME=WL_HOME\samples
set SAMPLES_HOME=C:\petstorefrom70to81
call "C:\bea70sp1\weblogic700\server\bin\startWLS.cmd"
-Dweblogic.security.SSL.trustedCAKeyStore=WL_HOME\server\lib\cacerts
Upgrading the Pet Store Application from WebLogic Server 6.1 Service Pack 4 to WebLogic Server 8.1
The procedures described below assume that WebLogic Server 6.1 and WebLogic Server 8.1 are both installed.
The procedure involves moving your application domain to a new directory and then updating paths in the config.xml and start scripts.
You may not need to move your domain. BEA Systems recommends that application domains reside outside the WebLogic Server installation directory.
Path="WL_HOME\config\petstore\applications">
Path="c:\petstorefrom61to81\config\petstore\applications">
Perform this substitution for the petstore.ear and petstoreadmin.ear paths as well.
Name="petstoreServer" RootDirectory="WL_HOME"
Name="petstoreServer" RootDirectory="C:\petstore61to81"
if not exist lib\weblogic.jar goto wrongplace
if not exist C:\bea81Dec4beta\weblogic81b\server\lib\weblogic.jar goto wrongplace
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.WL_HOME61\samples\eval\cloudscape\lib\cloudscape.jar;.\config\petStore\serverclasses
set CLASSPATH=.;WL_HOME81\server\lib\weblogic.jar;.C:\petstorefrom61to81\samples\eval\cloudscape\lib\cloudscape.jar;C:\petstorefrom61to81\config\petstore\serverclasses
Upgrading the Banking Application from WebLogic Server 5.1 to WebLogic Server 8.1
This example shows a successful upgrade from WebLogic Server 5.1 to WebLogic Server 8.1. The following example assumes an application running on WebLogic Server 5.1 SP12. The example is a simple banking application.
The following two main steps will migrate the banking application from WebLogic Server 5.1 to WebLogic Server 8.1:
Convert the weblogic.properties File
Use the WebLogic 8.1 Administration Console to convert the WebLogic Server 5.1 application's weblogic.properties file.
The second page of the "Convert weblogic.properties" path appears.
If the conversion is successful, a page will appear with a message something like the following:
New Domain name is migrationdomain
*************************************
Server Name is migrationserver
This server doesn't belong to any cluster
*************************************
Converting Server properties
Converting Server Debug Properties
Converting WebServer properties
Converting WebApp Component Properties
Converting JDBC Specific properties
Converting CORBA IIOP properties
Converting EJB Specific Properties
--- Warning Source File D:\510sp12\migrationserver\app_banking.jar does not exist copy the correct file manually after conversion to C:\banco\applications
Converting StartupClass properties
Converting Shutdown Class properties
Converting MailSession Properties
Converting FileT3 properties
Converting JMS properties
Converting Security Properties
Converting the PasswordPolicy properties
Converting User Group and ACL properties
Creating webApp for the servlets registerd in the properties file
Startup Scripts for the Server are created in the ResultDir C:\banco
Conversion successful.
Configure the Banking Application for WebLogic Server 8.1
To deploy and run the banking application on WebLogic Server 8.1:
Edit the startmigration Script
The weblogic.properties converter generated a script for starting up the banking application's domain. Specify some additional variables to run the banking application in this domain.
set APPLICATIONS=%WL51_HOME%\config\migrationdomain\applications
set CLIENT_CLASSES=%WL51_HOME%\config\migrationdomain\clientclasses
set SERVER_CLASSES=%WL51_HOME%\config\migrationdomain\serverclasses
set BANKING_WEBAPP_CLASSES=D:\banking\510sp12\migrationserver\serverclasses\examples\tutorials\migration\banking
set CLOUDSCAPE_CLASSES=%WL51_HOME%\samples\eval\cloudscape\lib\cloudscape.jar
CLASSPATH=...%APPLICATIONS%;%CLIENT_CLASSES%;%SERVER_CLASSES%;%BANKING_WEBAPP_CLASSES%;%CLOUDSCAPE_CLASSES%
Copy Banking Application Files to the Output Directory
Copy the application jar file and the web application classes and files to the banking directory.
Copy AccountDetail.jsp, error.jsp, login.html to C:\banco\applications\DefaultWebApp_migrationserver.
Deploy and Run the Banking Application
Start the application by navigating to c:\banco\ in a command console and entering the command startmigration.
See the application at http://localhost:7001/banking.