Usually the projects migrated by Morphis to a Java technology, are prepared to run on top of Apache Tomcat. Some customers might want to use different application servers, such as IBM's WebSphere Application Server (WAS). Different application servers usually require the projects to be tweaked accordingly. We discuss here the required steps to correctly configure your project to work with the aforementioned IBM's WAS.
Tomcat projects are usually packed in WAR files, while Websphere projects are packed in EAR files. EAR files are basically containers for WAR files, so we'll need to prepare a new project that knows how to create an EAR containing the WAR file that we were already producing for Tomcat.
The steps below can be performed either in Eclipse or in IBM's RAD. You can use either one, although, if you want to use any plugins provided my Morphis, you should work with Eclipse.
You'll need to make the following changes:
- Start by creating a new Enterprise Application Project. Set your web application project as a dependency of this Enterprise Application Project.
- In the WebApplication or WebService project, you'll need to remove the dependencies below:
Removing the dependencies can either be done by removing the jar files from the project dependencies or if you're using maven by removing the depency from the POM file
Some of these depencies might not be present in your environment. Don't worry about those.
You'll need to tweak one of the dependencies used in the project. Namely the spring-web-4.0.5.RELEASE.jar.
You'll need to find the mentioned jar file, open it (with any tool that is able to edit zip files), and remove the web-fragment.xml file within it
- Build and deploy
- After the first deploy, you'll need to change the class loader order to "parent last". You might not have enough permissions for this, in which case, you should request the WAS administrator to do it for you. See picture below to look at the mentioned configuration.