4 Replies Latest reply on Apr 3, 2014 8:34 AM by Randahl Fink Isaksen

    Can't connect to EJBs after migrating to WildFly

    Randahl Fink Isaksen Novice

      In short:

       

      1. Can anyone confirm that they have succesfully migrated their EJBs to WildFly 8 and are still able to connect to them from a remote client?

      2. Are you still connecting to port 4447 or is it now port 8080?

      3. Did you change anything in standalone.xml to make the connection work?

       

      I am asking, because I am having a hard time connecting from my remote client to my EJBs after I migrated to WildFly 8.0.0 Final.

       

      I used to connect to my EJBs on port 4447, but when doing so I simply get a timeout with this exception:

       

      java.lang.RuntimeException: Operation failed with status WAITING

        at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:94)

       

      I did a comparison of the standalone.xml configuration files of JBoss 7.2 and WildFly 8. In the old file the standard sockets section contain this configuration

       

          <socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="remoting" port="4447"/>

       

      This socket binding seems to be used by JBoss's remoting-connector configured here

       

              <subsystem xmlns="urn:jboss:domain:remoting:1.1">

                  <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>

              </subsystem>

       

      Now, when looking for this WildFly 8's standalone.xml it seems this remoting configuration have been replaced by

       

              <subsystem xmlns="urn:jboss:domain:remoting:2.0">

                  <endpoint worker="default"/>

                  <http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>

       

      This gave me a clue that the port 4447 has been replaced with port 8080. So now I have tried connecting using this simple test code

       

        properties.put("endpoint.name", "client-endpoint");

        properties.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");

        properties.put("remote.connections", "default");

        properties.put("remote.connection.default.host", "127.0.0.1");

        properties.put("remote.connection.default.port", "8080");

        properties.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");

        properties.put("remote.connection.default.username", "test");

        properties.put("remote.connection.default.password", "1234");

        final EJBClientConfiguration configuration =

        new PropertiesBasedEJBClientConfiguration(properties);

        final ContextSelector<EJBClientContext> selector =

        new ConfigBasedEJBClientContextSelector(configuration);

        EJBClientContext.setSelector(selector);

       

      However, with this code I get the following exception

       

      Caused by: java.lang.IllegalStateException: EJBCLIENT000024: No EJB receiver available for handling [appName:wefend-server, moduleName:wefend-ejb, distinctName:] combination

        at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:813)

        at org.jboss.ejb.client.EJBClient.createSessionWithPossibleRetries(EJBClient.java:222)

        at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:202)

        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.doCreateProxy(EjbNamingContext.java:216)

        at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createEjbProxy(EjbNamingContext.java:193)