0

My question is about :

I have a Java web application which generates a EAR file and currently runs on IBM Websphere 6.1 .

In its pom.xml it has WebSphere version dependency , I want to remove complete dependency and make my application as server independent.

Below is the dependency:

      ` <dependency>
            <groupId>com.ibm.websphere</groupId>
            <artifactId>j2ee</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.ibm.websphere</groupId>
            <artifactId>web-services</artifactId>
            <version>6.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.ibm.websphere.jre</groupId>
            <artifactId>ibmjceprovider</artifactId>
            <version>6.0.2</version>
            <scope>provided</scope>
        </dependency>`

So that in future if I want to migrate to a different Application server from WebSphere , like to Tomcat or Jboss , there is no dependency in the code.

Is it possible ? If yes then what is the best approach to do it.

Thank you in advance.

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
megha
  • 19
  • 3
  • 2
    Little note: Tomcat is not an application server, it is a servlet container. [Difference between an application server and a servlet container?](http://stackoverflow.com/questions/5039354/difference-between-an-application-server-and-a-servlet-container) - So, if you need an application server, it will be hard for your app tu run on a simple servlet container. – BackSlash Mar 06 '17 at 09:03
  • 1
    `j2ee` is just a packaging of public J2EE APIs, this is nothing WAS-specific there. What exactly does your code use from the other two? – ᄂ ᄀ Mar 06 '17 at 09:57
  • 1
    Remove the second two dependencies and see where your compilation failures are (if any). This will highlight where you have AS implementation dependent code – Steve C Mar 06 '17 at 11:57

0 Answers0