1 Reply Latest reply on Jun 28, 2006 9:14 AM by Scott Stark

    Calling EJB Remote Interface from Outside EAR Application

    Ashutosh Maheshwari Newbie

      Hi Forum,
      I am new to Jboss and J2EE so please ignore my ignorance.

      I have a EAR file containing EJB having a remote interface.Now i have to call this remote interface from another WAR file(this WAR is not contained
      in the EAR contaning EJB).Both EAR and WAR are deployed on the same
      JBoss Server.

      I have tried to call using the JNDI lookup like

      FiboHome home = (FiboHome) PortableRemoteObject.narrow(ctx.lookup("java:/comp/env/ejb/Fibo"),FiboHome.class);

      but while calling Remote Method system is throwing exception
      javax.naming.NameNotFoundException: ejb not bound

      Is this the right way to call Remote Interface from outside EAR? If Yes,what's wrong if no ,What is the right Way ?

      Thanks in Advance