geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: JNDI Name for EJB3
Date Wed, 17 Jun 2009 16:18:37 GMT

On Jun 17, 2009, at 8:43 AM, Juergen Weber wrote:

>
> Hi,
>
> I ran again into the problem of looking up an EJB3 from JNDI in a  
> JSP (Ger
> 2.1.4)
>
> The bean is
>
> @Stateless(name="Secure3")
> public class Secured3Bean implements Secured3
>
> Deployment log says
> 2009-06-17 17:31:22,989 INFO  [startup] Assembling app:
> /projekte/geronimo-jetty6-javaee5-2.1.4/var/temp/geronimo- 
> deployer4457332012373548807.tmpdir/Secured3Bean_ejb.jar
> 2009-06-17 17:31:22,993 INFO  [startup] Jndi(name=Secure3Remote) -->
> Ejb(deployment-id=Secured3Bean/Secure3)
>
> So I guess JNDI name is Secure3Remote.
> but context.lookup("java:comp/env/Secure3Remote") throws an  
> exeption, also
> context.lookup("Secure3Remote") and all other permutations I could  
> think of.
>
> http://cwiki.apache.org/GMOxDEV/client-jndi-names.html did not help.
>
> Could someone please give a hint what name I should try.

For phiosophical reasons I would not recommend using an ejb directly  
from a jsp, rather I'd suggest a servlet that constructs an easily  
rendered data model; in the servlet you can use annotations.

If you use a jsp you need to mention the ejb-ref in your web.xml and  
that should give you the name to look up.

thanks
david jencks

>
> Thanks,
> Juergen
>
> -- 
> View this message in context: http://www.nabble.com/JNDI-Name-for-EJB3-tp24076429s134p24076429.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>

Mime
View raw message