[jboss-user] [EJB 3.0] - Re: Session Bean lookup from a JSP

PeterJ do-not-reply at jboss.com
Fri Aug 18 11:27:28 EDT 2006


You have to look up the session bean by its JNDI name.  From the code you posted, it appears that Glassfish, either by default or by convention, uses the class name of the session bean as the JNDI name.

In JBoss, you provide a META-INF/jboss.xml file in your ejb jar file, and that file contains a jndi-name tag to give the session bean a name in the global JNDI namespace.  Additionally, in the WEB-INF/web.xml file and WEB-INF/jboss-web.xml file you can provide name to use for the ENC (enterprise naming context) namespace (e.g, java:/comp/env/...).

Here are some resources that provide examples or more information:

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=85749

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=88524

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=83428

http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch3.chapter.html#ch3.j2ee

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966093#3966093

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966093



More information about the jboss-user mailing list