users@glassfish.java.net

Re: lookup ejbs

From: Sahoo <Sahoo_at_Sun.COM>
Date: Tue, 14 Oct 2008 01:56:55 +0530

You need to add either a <ejb-local-ref> or <ejb-ref> in ejb-jar.xml
depending on the type of EJB. Refer to GlassFish EJB FAQ (search the net).

glassfish_at_javadesktop.org wrote:
> Hello everybody, sorry for my bad english.
>
> I have a little problem to access my ejbs with their jndi name.
>
> My project is an ear, so the VM used for the "EJB tier" is the same than the one used for the view, and I sould have the possibility to access my EJBs easily.
>
> But when I use the following annotation on my session bean:
> [code]
> @Stateless(name="addressManagerBean", mappedName="ejb/addressManagerBean")
> [/code]
>
> And the following string to access them:
> [code]
> java:comp/env/ejb/addressManagerBean
> [/code]
> Or
> [code]
> java:comp/env/addressManagerBean
> [/code]
>
> I have the following message:
> [code]
> No object bound to name java:comp/env/addressManagerBean
> [/code]
>
> I can't use the @EJB annotation because I am working with Spring to access my EJBs.
>
> The thing the most strange is that I have already had the same application working, I am almost sure! I have frequently this kind of problem with glassfish and EJBs, does someone understand what is wrong here?
> [Message sent by forum member 'rageice' (rageice)]
>
> http://forums.java.net/jive/thread.jspa?messageID=306257
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>