EJB integration

From: Bill Burke <>
Date: Fri, 12 Sep 2008 19:05:12 -0400

This is something to think of down the road for the JAX-RS revision in
EE 6...

Basic EJB integration could be very simple. Since WAR's will support
deploying EJB jars within WEB-INF/lib, we can say that any EJB's
annotated with JAX-RS annotations will take on the root context of the
WAR and be available under that URL. The only thing sucky about this is
the url-pattern limitations of web.xml. It would be cool if we could
also allow JAX-RS @Path expressions within url-pattern matching (for
security constraints and filters).

Another interesting EJB integration point might be with interceptors.
Since EJB interceptors don't implement an interface, we can allow users
to reuse @*Param annotations within @AroundInvoke methods. For example:

public class MyEjbInterceptor {

    public Object intercept(@HeaderParam("myHeader") header,
InvocationContext ctx) throws Throwable {

I can see a big usecase for cross-cutting interceptors that use custom
HTTP headers/cookies from the client to do stuff like funky security,
session management, or even transactional contexts.

Bill Burke
JBoss, a division of Red Hat