Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10502

Remoting not using configured XNIO worker in standalone client

    XMLWordPrintable

Details

    Description

      Given that there is an XNIO worker defined in wildfly-config.xml, for example like this:

      <worker xmlns="urn:xnio:3.5">
              <worker-name value="myworker"/>
              <outbound-bind-addresses>
                  <bind-address bind-address="127.0.0.9" bind-port="61111" match="0.0.0.0/0"/>
              </outbound-bind-addresses>
      </worker>
      

      It is not picked up for a standalone client application.

      To get a non-default configuration for an XNIO worker applied, so far we only found an ugly way to use a custom worker by creating it programmatically (and with having to twiddle with method visibility):

      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);
      

      Attachments

        Issue Links

          Activity

            People

              dlloyd@redhat.com David Lloyd
              jmartisk@redhat.com Jan Martiska
              Ivan Straka Ivan Straka
              Ivan Straka Ivan Straka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: