Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services - RESTful services > Develop JAX-RS web applications


Migrate a Feature Pack for Web 2.0 JAX-RS application to WebSphere v8

When packaging an application for the Feature Pack for Web 2.0, manually make the Java API for RESTful Web Services (JAX-RS) run time available on the application CLASSPATH. A common way of doing this is placing the JAX-RS runtime JAR files in the WEB-INF/lib directory of the WAR module. In v8, the JAX-RS runtime environment is native to the application server. It is no longer necessary to manually add the path of the runtime libraries on the CLASSPATH. Migrating Web 2.0 applications to the native runtime environment simplifies packaging and deployment, and allows for future updates to take advantage of Java EE integration features. Identify Feature Pack for Web 2.0 JAX-RS applications to migrate to the native v8 JAX-RS runtime environment. Identify where the JAX-RS runtime JAR files have been made available to the application CLASSPATH. Two common methods are the WEB-INF/lib directory of the WAR module or by way of a shared library.

In WebSphere v8, the JAX-RS run time runs natively within the application server process. Unlike deploying JAX-RS applications with the Web 2.0 Feature Pack installed on WebSphere Version 7 or earlier, it is no longer necessary to package the JAX-RS runtime JAR files as an external library for the application.

To migrate Web 2.0 applications to the v8 runtime environment, simply remove the external JAX-RS runtime libraries. For example, if the runtime JAR files were placed in the WEB-INF/lib directory of the WAR module, delete them from that directory before redeploying the application. No other changes are necessary. All other application configurations, such as web.xml configuration, are still valid in WebSphere v8.

Once the external JAX-RS runtime library is removed, the native runtime environment runs the JAX-RS application. There are advantages to this over Web 2.0 deployment. Application packaging and deployment are simplified since it is no longer necessary to add external libraries on the application CLASSPATH. Additionally, new Java EE integration features can be taken advantage of in future updates to the application. Examples are EJB in a WAR and Java Contexts and Dependency Injection (JCDI) support.


Procedure

  1. Remove external JAX-RS runtime libraries from the Feature Pack for Web 2.0 application.
  2. Redeploy the application.


Results

You have migrated a Web 2.0 Feature Pack JAX-RS application to the native WebSphere v8 JAX-RS runtime environment.
Deploy JAX-RS web applications

+

Search Tips   |   Advanced Search