Dans Liberty, JAX-RS 2.0 prend en charge EJB JAX-RS dans le fichier JAR EJB qui
doit être inclus dans un fichier EAR.
Procédure
- Déployez le nouveau fichier myearfile.ear sur Liberty.
- Utilisez le masque d'URL suivant pour accéder au service JAX-RS :
http://<host>:<port>/<context root>/<path of jaxrs resource>
For example, you can access EJB JAX-RS in <myejbjaxrs.jar>: http://<host>:<port>/myejbjaxrs/<path of jaxrs resource>
Remarque : If there are EJB JAX-WS classes in the same
EJB-jar and the JAX-WS 2.2 feature is enabled, that means JAX-WS router
module also exists, then the default context root should be the short
file name of EJB jar+".jaxrs" like "myejbjaxrs.jaxrs" for <myejbjaxrs.jar>.