2 Replies Latest reply on Feb 15, 2013 4:59 PM by Todd Trimmer

    Allow socket-binding-group-refType to override default-interface

    Todd Trimmer Newbie

      I want all the host controllers in my domain to use the same socket-binding-group. However, each host controller can have multiple servers, each with its own IP, but each IP still reuses the same port number (yet still a unique IP+port combo). The problem is that the socket-binding-group-refType will not let me override the @default-interface value from the referent socket-binding-group. I am forced to create a second, equally verbose, socket-binding-group exactly like the first group in every way, except for the @default-interface. I wish to avoid this. My particular scenario cannot rely on @port-offset because my hardware load-balancer needs all nodes in the same pool to use the same ports.

       

      Consider the following configuration. The domain defines the reused template socket-binding-group as @name="standard-sockets" with @default-interface="public". My host configuration would love to fire up a second server using standard-sockets as a template, yet override @default-interface to public-two, where my second IP is defined.

       

      domain.xml

      {code:xml}

      ...

          <interfaces>

              <interface name="management" />

              <interface name="public" />

          </interfaces>

          <socket-binding-groups>

              <socket-binding-group name="standard-sockets" default-interface="public">

                  <socket-binding name="ajp" port="8009" />

                  <socket-binding name="http" port="8080" />

                  <socket-binding name="https" port="8443" />

                  <socket-binding name="osgi-http" interface="management" port="8090" />

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

                  <socket-binding name="txn-recovery-environment" port="4712" />

                  <socket-binding name="txn-status-manager" port="4713" />

                  <outbound-socket-binding name="mail-smtp">

                      <remote-destination host="localhost" port="25" />

                  </outbound-socket-binding>

              </socket-binding-group>

          </socket-binding-groups>

          <server-groups>

              <server-group name="prod-server-group" profile="default">

                  <socket-binding-group ref="standard-sockets" />

              </server-group>

          </server-groups>

      ...

      {code}

       

      host.xml

      {code:xml}

      ...

          <interfaces>

              <interface name="public">

                  <inet-address value="10.10.10.1" />

              </interface>

              <interface name="public-two">

                  <inet-address value="10.10.10.2" />

              </interface>

          </interfaces>

      ...

          <servers>

              <server name="server-one" group="prod-server-group" auto-start="true">

                  <jvm name="jvm6g" />

              </server>

              <server name="server-two" group="prod-server-group" auto-start="false">

                  <jvm name="jvm2g" />

                  <socket-binding-group ref="standard-sockets" default-interface="public-two" />

              </server>

          </servers>

      ...

      {code}

       

      That last socket-binding-group is currently illegal. The socket-binding-group-refType defined in the schema does not have a @default-interface override.