O'Reilly logo

EJB 3.1 Cookbook by Richard M. Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating an EJB-based web service using JAX-RS

A RESTful web service is useful for applications which do not require the use of transactions, security and other features that can adversely impact its performance. JAX-RS supports the creation of RESTful applications. These types of services are typified through the use of HTTP commands such as GET and POST. In this recipe, we will use annotations that identify methods of a service corresponding to these commands.

Getting ready

The two basic steps involved in creating a JAX-RS web service include:

  1. Creating an EJB which provides the application's functionality
  2. Creating a Web Service (JAX-RS) which utilizes the EJB

    We will reuse the CustomerManager class as described in the first recipe to provide our ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required