Déploiement d'EJB dans un fichier EAR pour JAX-RS 2.0

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

  1. Déployez le nouveau fichier myearfile.ear sur Liberty.
  2. 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>.

Icône indiquant le type de rubrique Rubrique Tâche

Nom du fichier : twlp_ejb_in_ear.html