users@glassfish.java.net

Re: lookup ejbs

From: <glassfish_at_javadesktop.org>
Date: Wed, 15 Oct 2008 14:39:01 PDT

Thank you very much for all these informations, this summary will probably help me in the future.


But in my case, it is a little bit different, for several reasons:

Firstly, I use Spring, so I shouldn't need to use the @EJB annotation in the web tier. Logically, I just give it the good jndi name:
    <jee:local-slsb
        id="personManager"
        jndi-name="java:comp/env/personManagerBean"
        business-interface="app.ejb.session.PersonManagerLocal"
    />
Ant tte fact that I can't access the EJB isn't a problem from Spring. I have already done this with glassfish and Spring, without problem (and I have tried to use the lookup method, with exactly the same error than with Spring)

Secondly, in my knowledge, it is possible to define the jndi name (behind "java:comp/env" in the EJB tier, and I thunk that it was with the annotations @Stateless(name="", mappedName="") and @Statefull(name="", mappedName="").

And fially (but it is not really the problem here), with glassfish, I think that you can simply use the @EJB annotation with a simple attribute to use it directly as an ejb (but one more time it is not what I am looking for actually, and it is not generic).

I hope my language is understandable, tell me if I am not clear.


I would be really really happy to find the solution to this strange problem. I am almost sure that the solution is very simple, but I can't find it.

Thank you for your help.
[Message sent by forum member 'rageice' (rageice)]

http://forums.java.net/jive/thread.jspa?messageID=307711