users@jersey.java.net

Re: [Jersey] Endpoints as EJB in separate module.

From: Paul Sandoz <Paul.Sandoz_at_oracle.com>
Date: Thu, 21 Oct 2010 09:31:56 +0200

Hi,

It is an issue that we did not detect for JAX-RS 1.1 and EE 6. There
is no default portable way to look up an EJB from a war to an ear.

For Jersey it is currently necessary to explicitly map the EJB name to
the java:module namespace so it can then be looked up using that
namespace in JNDI.

I am CC'ing Marina from the EJB team. Marina, would it be possible to
point me to an example or provide one that declares an EJB mapping to
the java:module namespace such that the a class in the war can look it
up using JNDI without knowing the module name?

Also, if possible, could you point in the direction of how, in GF,
@EJB works when say a servlet uses @EJB. The servlet injection must be
looking up an EJB from an ear and i assume there is a GF specific API
to do this.

Thanks,
Paul.

On Oct 20, 2010, at 5:11 PM, Jarosław Lewandowski wrote:

> Hi,
>
> I've just faced a problem with endpoints as EJBs included in
> separate module in EAR application. So in my case I'm creating
> custom subclass of javax.ws.rs.core.Application with all classes
> defined in there. Some of the classes are EJBs existing in the other
> module. Unfortunatelly Jersey is trying to lookup for EJB using
> java:module context, which fails. Just wonder is this intentional or
> is it kind of issue? In JAX-RS spec v.1.1 says: "In a product that
> also supports EJB, an implementation MUST support use of stateless
> and singleton session beans as root resource classes, providers and
> Application subclasses." Nothing is said how beans should be
> packaged in an Enterprise Application.
>
> Regards
> JL
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>