ejb@glassfish.java.net

Re: local slsb lookup

From: Andreas Kozma <andreas.kozma_at_ansis.com>
Date: Tue, 19 May 2009 08:38:06 +0200

Yes, we are also facing this problem. Interestingly, the local
interfaces don't show up in the JNDI browser on the admin console
either. so we don't know where to find the appropriate format.


Kind regards,

- Andreas Kozma
www.ansis.com



On May 18, 2009, at 10:39 , Tim Kiener wrote:

>
> hi there,
>
> its really annoying. i just cant get this usecase to work:
>
> #1: i have got a simple POJO
> #2: i have got a
>
> @Local(MyLocal.class)
> @Stateless
> public class MyLocalEJB implements MyLocal{...}
>
> #3 the PJO and the EJB run within the same EJB-Jar(and EAR)
>
> Question:
>
> How can i lookup the local EJB within my POJO.
>
>
> I tried the following:
>
> #A
>
> InitialContext ic =new InitialContext();
> ic.loopkup("java:comp/env/MyLocalEJB");
>
>
> #B
> setting @Stateless(name="MyLocalEJB")
>
> and tried the ic.lookup(...) again
>
>
> #C
> setting @Stateless(name="ejb/MyLocalEJB")
>
> and tried the ic.lookup("java:comp/env/ejb/MyLocalEJB") again
>
>
>
> CONCLUSION
> nothing worked.
>
> the glassfish-faq is not clear for me. they assume that you want to
> lookup a local-ejb from a web-client and therefore
> edit the web.xml
> thats not what i want.
>
> if anybody knows the solution, please be as clear as you can writing
> sample-code.
>
>
>
> thanks in advance. and sorry for sounding stressed.
> tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>