I'm doing a JNDI lookup via:

Object homeObj = ctx.lookup("ejb/foo/FooHome");

The jboss.xml has:


  <ejb-name>Foo</ejb-name>
  <jndi-name>ejb/foo/FooHome</jndi-name>


When I run the program which does the lookup I get the exception:

javax.naming.NameNotFoundException: ejb not bound

If I look at this bean in the JBoss Web Console it indicates:

Foo (JNDI: Foo)

which would seem to indicate that its using the ejb-name for the JNDI name and 
not respecting the explicit jndi-name in jboss.xml.

I could probably resolve this by changing my lookup to:

Object homeObj = ctx.lookup("Foo");

but that's not solving the root of the issue and it would require many edits to 
many EJBs in my deployment descriptor which all use the:

<jndi-name>ejb/foo/</jndi-name>

I'd rather fix it the right way and leave my descriptor alone.




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

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


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to