users@jersey.java.net

Re: [Jersey] Using EJBProvider for _at_EJB annotation

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 08 Aug 2008 11:11:39 +0200

Hi Manjunath,

I saw your comment on the blog entry and replied. Glad you emailed the
users list :-)

Manjunath Shankar wrote:
> Hi,
>
> I am using the Jersey Framework for some of my interfaces.
>
> I am trying to use the @EJB annotation using the above method. When I
> look at the logs, it tells me that the provider class has been found.
> But when I invoke a method on the fooSessionRemoteBean, it throws a null
> pointer exception. I am using the Jersey 0.8.
>
> Is there anything extra that needs to be done apart from what is
> provided by you above? (I have placed the Paul Sandoz's sample code from
> his blog as is in my implementation).
>
> Has anyone else tried this and can give me any pointers?
>

My guess is that the:

   ic.lookup(c.getName());

is returning null. Can you verify that? i.e. the FooSessionRemote EJB is
registered under a different name to that of the class name.

Note that the implementation is an example and would require more work
to fully support the @EJB semantics.

Paul.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109