Deploying EJB in an EAR file for JAX-RS 2.0
In Liberty, JAX-RS 2.0 supports EJB JAX-RS in EJB JAR file that must be included in an EAR file.
- Deploy the new myearfile.ear file to Liberty.
- Use the following URL pattern to access the JAX-RS service::
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>Note: 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>.