Details

      Description

      There are two application
      The first is client-to-server, which contains two projects. One is client and second one is a server part - ejb called by client. Returns ejb client ip address.
      The second application server-to-server contains two deployable apps. One is meant to be client - attempting to invoke EJB on the second server, which returns the client's ip address.

      server-to-server.zip
      After configuring client eap with

      /subsystem=io/worker=default/outbound-bind-address=default:add(bind-address=127.0.0.1, bind-port=12345, match=0.0.0.0/0)
      

      client binds to random port number. See 127.0.0.1:8080/client-side return string.

      client-side app is simple servlet, which looks up EJB and invokes hello method.
      server-side app is simple EJB with one method hello that returns info string about client (user and source ip address)

      Instruction about deploying and running are in README file in zip file.

      client-to-server.zip
      We are trying to bind client to specific address in wildfly-config.xml, but actual source address is always 127.0.0.1 when invoking over a loopback address or the machine's public IP address when invoking over a public IP address. The port is always random, not the one configured.

      Client is a standalone app that looks up an EJB and invokes hello method.
      Server app is simple EJB with one method hello that returns info string about client (user and source ip address)

      We are able to define the worker in wildfly-config.xml but unsure how to make the client pick this worker instead of a default one. To work around this, we have also tried to configure worker programmatically this way (we had to use reflection to be able to use XnioWorker.Builder):

              final Constructor constructor = XnioWorker.Builder.class.getDeclaredConstructor(Xnio.class);
              constructor.setAccessible(true);
              XnioWorker.Builder builder = (XnioWorker.Builder) constructor.newInstance(Xnio.getInstance());
              builder.addBindAddressConfiguration(
                      CidrAddress.INET4_ANY_CIDR,
                      Inet4Address.getByName("127.0.0.9")
              );
              final XnioWorker worker = builder.build();
              XnioWorker.getContextManager().setGlobalDefault(worker);
      

      but that didn't help and the client's source address is still 127.0.0.1.

      Instruction about deploying and running are in README file in zip file.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dmlloyd David Lloyd
                  Reporter:
                  istraka Ivan Straka
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: