users@jersey.java.net

Re: [Jersey] Exposing EJB 3 Beans through JAX-RS

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 08 Sep 2008 09:23:17 +0200

On Sep 8, 2008, at 9:16 AM, Markus KARG wrote:

>> IMHO the use of EJBs defined to be JAX-RS resources may be somewhat
>> limited because (session) EJBs are designed for RCP-style
>> interactions
>> (CORBA, WS-*) thus resource methods may not make any sense in terms
>> of
>> equivalent calls using CORBA.
>
> Maybe it makes sense to merge the JAX-RS resource and the
> SessionBean to
> become a single class? Actually the JAX-RS resource is often just an
> interfacing layer, providing some services around JPA resources --
> just like
> many session beans are. So it might be a good solution to annotate a
> session
> bean's method with @GET, @PUT etc.?
>

Yes, that is what i was referring to, and suggesting two solutions to
support the registration of such annotated session beans (that are
also registered in JNDI). Jersey should be able to process the
annotations and not have to know that there are specific to a session
bean, all it requires is an instance.

Paul.