dev@jsr311.java.net

Re: JSR311: EJB integration

From: Larry Cable <larry.cable_at_oracle.com>
Date: Mon, 15 Sep 2008 13:29:52 -0700

+1!!!

Bill Burke wrote:
> 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).
>
Do we need the Servlet 3.0 EG to include something here?
> 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 {
>
> @AroundInvoke
> 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.
>
>