users@glassfish.java.net

Re: [Jersey] Re: question about _at_Local access in EAR file

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 10 Aug 2009 09:56:37 +0200

On Aug 9, 2009, at 7:36 PM, Felipe Gaścho wrote:

> problem is: I am using Jersey.. and it seems to work only with the
> remote interface..
>
> from the Sandoz example:
>
> /** @author paulsandoz */
> @Path("web")
> public class WebRootResource {
> @EJB private SessionBeanRemote sessionBeanLocal;
>
> Question: why he named the reference as "sessionBeanLocal" if the
> interface used is the remote one ??
>

Junk DNA n the example :-) i was probably experimenting with local
EJBs first, then transformed the sample to use remote emote EJBs but
forgot to change the name appropriately.


> is there any Jersey or Glassfish trick that lookup remote interfaces
> locally when the resource is in the same application ?
>

I think Alexis is correct in that you need to specify the local EJB in
the web.xml. Been a long time since i played around with this so i
cannot remember the exact details.

Paul.