JBoss.orgCommunity Documentation

Chapter 47. Jakarta Enterprise Beans Integration

RESTEasy currently only has simple integration with Jakarta Enterprise Beans. To make a bean a Jakarta RESTful Web Services resource, an SLSB's @Remote or @Local interface must be annotated with Jakarta RESTful Web Services annotations. Also the application's beans must be configured in web.xml.

public interface Library {
   public String getBook(@PathParam("isbn") String isbn);

public class LibraryBean implements Library {



Next, in RESTEasy's web.xml file manually register the bean with RESTEasy using the resteasy.jndi.resources <context-param>

   <display-name>Archetype Created Web Application</display-name>


This is the only portable way RESTEasy offers Jakarta Enterprise Beans integration. Future versions of RESTEasy will have tighter integration with Wildfly, thus eliminating manual registrations or modifications to web.xml.

If you're using RESTEasy with an EAR and Jakarta Enterprise Beans, a good structure to have is:

       ----WEB-INF/lib (nothing)
       ----All RESTEasy jar files

From the distribution, remove all libraries from WEB-INF/lib and place them in a common EAR lib or place the RESTEasy jar dependencies in the application server's system classpath.