Migrating a Feature Pack for Web 2.0 JAX-RS application to WebSphere Version 8

When packaging an application for the Feature Pack for Web 2.0, you must 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 Java archive (JAR) files in the WEB-INF/lib directory of the web archive (WAR) module. In Version 8, 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 Platform, Enterprise Edition (Java EE) integration features.

Before you begin

Identify Feature Pack for Web 2.0 JAX-RS applications to migrate to the native Version 8 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.

About this task

In WebSphere® Version 8, 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 Version 8 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 Version 8.

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 Enterprise JavaBeans (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 Version 8 JAX-RS runtime environment.




In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 20, 2011 1:37:18 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=v800webmob&product=was-nd-mp&topic=twbs_jaxrs_migrate_web20
File name: twbs_jaxrs_migrate_web20.html