[jboss-user] [EJB 3.0] - Re: Remote Client to EJB 3.0 fail .. :( javax.naming.Communi

PeterJ do-not-reply at jboss.com
Tue Jul 11 13:01:20 EDT 2006

I copied your code, ran it, and finally figured out what was wrong.  The annotation @Stateless(name="SimpleEJB") names the EJB, but it does not provide the JNDI name for the EJB.  The JNDI name, by default, is "SimpleEJB/remote" (or "SimpleEJB/local").

So you can do one of two things.

Change your lookup code to read:

SimpleEJB sessEJBTest = (SimpleEJB)context.lookup("SimpleEJB/remote");

Or add a JBoss-specific annotation to your bean class:

  | @org.jboss.annotation.ejb.RemoteBinding(jndiBinding="SimpleEJB")
  | public final class SimpleEJBBean implements SimpleEJB {
  | ...

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

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

More information about the jboss-user mailing list