7 Replies Latest reply on May 22, 2015 2:54 AM by jaikiran

    Issue with jboss-ejb-client

    abhinav.gupta01

      We are using wildfly 8.1 Final release.

      System is configured with two wildfly standalone instances running on two different nodes.

      Each instance will act both as EJB client and Server at the same time. Basically 2nd instance use EJB to log some information on first.

       

      Everything works perfectly , But suddenly we start getting :


      java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:appName, moduleName:EJBNAme, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@360b9613

       

      We checked that EJB server at this point is working fine, I try to hit same EJB from a different standalone client and it works perfectly. So issue is with client.

      I know above exception can occur because of many reason , but what can trigger that in a working env , this is what I am worried about. To look more ; I enable EJB client logging and found below logs :


      2015-05-12 10:52:40,408 TRACE [org.jboss.ejb.client.EJBClientContext] (Thread-1440) EJB client context org.jboss.ejb.client.EJBClientContext@49093df1 has been closed, returning an empty collection of EJB receivers

      2015-05-12 10:52:40,426 TRACE [org.jboss.ejb.client.EJBClientContext] (Thread-1440) EJB client context org.jboss.ejb.client.EJBClientContext@49093df1 has been closed, returning an empty collection of EJB receivers


      From this I get EJBClientContext is closed . But question is How this can be closed ?


      We are using remote-naming project for EJB client and below is what our configuration looks like:


      final Properties jndiProperties = new Properties();

      jndiProperties.put("java.naming.factory.initial", "org.jboss.naming.remote.client.InitialContextFactory");

      jndiProperties.put("java.naming.provider.url", "http-remoting://server:8080");

      jndiProperties.put("java.naming.security.principal", "user");

      jndiProperties.put("java.naming.security.credentials", "pass");

      jndiProperties.put("jboss.naming.client.ejb.context", "true");

       

                         javax.naming.Context context = new javax.naming.InitialContext(jndiProperties);

                         Object obj = context.lookup("jndiName");

                          home = PortableRemoteObject.narrow(obj, EJBHome.class);

                         myHomeclass h = (myHomeclass) home;

       

       

      To add : we even hold reference to InitialContext in a static map . So we can never loose initialContext object as well.

       

      When we restart EJB client , everything starts working again !!

       

      To update EJB client to wildfly recommended EJB Client Library is not an option with us , because of many other dependencies.

      We are stuck because of this from past few days.