JAX-RS is a standard that makes it easy to create a RESTful service that can be deployed to any Java application server: GlassFish, WebLogic, WebSphere, JBoss, etc.
JAX-RS is part of Java EE, and when JAX-RS is used with other Java EE technologies it becomes even easier to create your RESTful service:
- EJB - A session bean is used as the service implementation and also handles the transaction semantics.
- JAX-RS - Used to expose the session bean as a RESTful service
- JPA - Used to persist the POJOs to the database. Note how the EntityManager is injected onto the session bean.
- JAXB - Used to convert the POJO to/from XML (in GlassFish it can also be used to convert the POJO to/from JSON). JAX-RS by default handles the interaction with the JAXB implementation.
Comments
Post a Comment