3 Replies Latest reply on Nov 18, 2013 6:17 AM by Nicolas Tanghe

    EJB invocation from remote Jboss server

    Nicolas Tanghe Newbie



      I followed the following documentation : EJB invocations from a remote server instance - JBoss AS 7.1 - Project Documentation Editor


      After this configuration, I try to reach my remote ejb.


      final Hashtable props = new Hashtable();

      props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");

      Context context = new InitialContext(props);

      BapServiceRemote bapService = (BapServiceRemote) context.lookup("ejb:" + "" + "/" + "BapApp" + "/" + "" + "/" + "BapService" + "!" + "be.fgov.health.bap.service.BapServiceRemote");

      List<Invoice> invoices = bapService.getAllInvoices(); -> ERROR


      No EJB receiver available for handling [appName:,modulename:BapApp,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1443c7a


      After some searches, I think that is a problem with jndi name.

      For the construction of jndi name, I followed



      But my packaging for ejb is "jar in war".




                service.jar -> contains my ejb.


      With this kind of packaging, what is the good "jndi" name ?


      In fact, in documentation, examples are with ejb in ear or directly in war file but never in a jar in a war file.


      Thanks !