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.
The two basic steps involved in creating a JAX-RS web service include:
- Creating an EJB which provides the application's functionality
- Creating a Web Service (JAX-RS) which utilizes the EJB
We will reuse the
CustomerManagerclass as described in the first recipe to provide our ...