0 Replies Latest reply on Oct 20, 2019 12:02 PM by pawan1691

    Invoking remote EJB deployed on Wildfly17 server from another client application also deployed on Wildfly17

    pawan1691

      HI,

       

      I am trying to invoke an Stateful EJB  from a client application via JNDI lookup. both are deployed and running on same wildfly17server instance.

           

          

        InitialContext context = null;

           Backend remote = null;

           try {

           Map<String, String> environment = new Hashtable<>();

           environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");

           environment.put(Context.PROVIDER_URL,"http-remoting://localhost:8080");

           context = new InitialContext((Hashtable<String, String>) environment);

           remote = (BackendRemote) context.lookup("ejb:backend/backend/BackendBean!ch.nic.reg.common.BackendRemote?stateful");

           } catch (Exception e) {

                e.printStackTrace();

           }

       

      javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "backend/backend/BackendBean!ch.nic.reg.common.BackendRemote?stateful" [Root exception is org.jboss.ejb.client.RequestSendFailedException: EJBCLIENT000409: No more destinations are available]

      08:43:19,916 ERROR [stderr] (ServerService Thread Pool -- 75) at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:160)

      ....

      08:43:19,925 ERROR [stderr] (ServerService Thread Pool -- 75) Caused by: org.jboss.ejb.client.RequestSendFailedException: EJBCLIENT000409: No more destinations are available

      08:43:19,925 ERROR [stderr] (ServerService Thread Pool -- 75) at org.jboss.ejb.client.NamingEJBClientInterceptor.handleSessionCreation(NamingEJBClientInterceptor.java:100)

       

       

      Can anyone please help on this issue ?