Migrating a BEA WebLogic 6.0
webapp.cookie WAR to Lutris EAS 4
Glen Carl, Lutris Technologies
Introduction
In a quest to understand what is required to migrate
applications to Lutris EAS, I have first set out on a journey to migrate
a standard J2EE Web Application Archive (WAR) from BEA WebLogic 6.0 to
Lutris EAS 4.0. The following is a simple story of what was required to
accomplish this adventure.
The
Migration WAR Saga
For my research of migrating a WAR from BEA to Lutris
EAS, I decided to choose a simple web application located within the “samples/examples”
directory included with the evaluation copy of BEA WebLogic Server 6.0sp1.
To get instructions for the BEA J2EE examples, open
the overview-summary.html page within the Weblogic 6.0sp1 samples/examples
directory. This page will provide you with an examples index which will
guide you to various J2EE examples. Now select the “Web Application Archive
(WAR) format” link, and this will provide you with the WAR examples. I
chose the webapp.cookie “Simple Web Application”. Now follow the instructions
for building the example and to run the example. The “cookie” example
provided a convient “build script” which will build the WAR. Make sure
to run the “setExamplesEnv.cmd” located in the config/examples directory.
When successful, a “cookie.war” file will be created in the config/examples/applications
directory. When the WebLogic Server is started the cookie web application
will deploy, and the application can be loaded into a browser using a
URL such as: http://hostname:port/cookie where: hostname
is the host name of the Weblogic server, and port is the port where the
WebLogic Server is listening for connections.
Now for some fun, to migrate this WAR example to
Lutris EAS. It was expected that the changes needed to migrate a standard
J2EE WAR to Lutris EAS are minimal. What was discovered was that only
the web.xml file needed a minor modification to the DTD Web Application
line to change version from 1.2 to 2.2.
Here is the original line from the web.xml for the
BEA "cookie" WAR example.
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
to get the "cookie"
WAR to launch on EAS I had to modify the above line with:
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
Again, this was just a change in version, and to
determine what needed changing, I attempted to deploy the “cookie.war”
without any changes. During the deployment on Lutris EAS, a message in
the status history was displayed with the following message: “stdout,INFO:
XmlMapper: Can’t find resources for entity: -//Sun Microsystems, Inc.//DTD
Web Application 1.2//EN à http://java.sun.com/j2ee/dtds/web-app_2_2.dtd”null”.
Therefore, Lutris EAS will provide you with some helpful hints on what
will need changing.
After changing the web.xml file and again following
the instructions from BEA on building the webapp.cookie sample application,
it is necessary to deploy the modified WAR on the Lutris EAS server. Therefore,
start up the Lutris EAS server, and follow normal procedures for deploying
a WAR. Basically, execute the “deploy” command or use the Lutris Management
Console (LMC) to accomplish the deployment. It will now be necessary
to start the “cookie” application. You can either start the application
via the LMC or launch a browser with the Enhydra Multiserver Administration
Console, find the “cookie” application and select “start”. The application
can be loaded into a browser using a URL such as: http://hostname:port/cookie where: hostname
is the host name of the Lutris EAS server, and port is the port where
the Lutris EAS server is listening for connections. Via the Enhydra Multiserver
Administration Console select the “cookie” application, and then select
the “CONNECTIONS” tab, and select the link to the “cookie” application.
The application will run as advertised by the BEA documentation.
The experience of migrating a simple standardized
J2EE WAR was straight forward, and requires very little understanding
of the weblogic.xml or enhydra_web.xml descriptors. To migrate a WAR that
makes use of specific BEA WebLogic functionality, it will be necessary
to attempt to find similar functionality in the enhydra_web.xml descriptors.
It is recommended to study the Lutris EAS Deployment and Management Guide
which is included with the Lutris EAS product.
Conclusion
Migrating a standard J2EE Web Application Archive
(WAR) from BEA to Lutris EAS is very simple, and may require only minor
changes to the web.xml descriptor file. Lutris EAS will provide error
messaging to help in determining what may need changing in your web.xml
file. The migration will require more effort if an application has made
use of the BEA WebLogic specific functionality, and includes the weblogic.xml
descriptor. Documentation regarding the specific descriptors for Lutris
EAS is provided with the product and updated documentation can be found
at http://www.lutris.com/documentation
for registered users.
References
J2EE Specification: http://java.sun.com/j2ee/
Lutris EAS: Product Information
http://www.lutris.com/products/
Lutris EAS: Deployment
and Management Guide http://www.lutris.com/documentation/
BEA WebLogic E-Business
Platform Evaluation Software: http://www.bea.com/eval/jdj0601/
BEA WebLogic Documentation:
http://e-docs.bea.com/wls/docs60/
|