[jboss-as7-dev] Support for port offset on standalone server management sockets

Brian Stansberry brian.stansberry at redhat.com
Sat Nov 12 20:38:33 EST 2011


I've put in a pull request[1] for work that provides $subject[2] along 
with some other fixes related to configuring the management interface 
sockets. The patch involves xml changes, so I wanted to post on the list 
to show the difference and solicit feedback.

The 7.0.x config for these sockets was:

<management-interfaces>
  <native-interface address="management" port="9999"
     security-realm="ManagementRealm"/>
  <http-interface address="management" port="9990" secure-port="12345"
     security-realm="ManagementRealm"/>
</management-interfaces>

The intent of the patch is that these management sockets would be 
declared in the standalone.xml <socket-binding-group> section along with 
all the other sockets. Because of this, the port-offset behavior that 
applies to all the other sockets will also apply to these management 
socekts.

Then the management-interfaces elements would reference those elements:

<management-interfaces>
   <native-interface security-realm="ManagementRealm">
     <socket-binding native="management-native"/>
   </native-interface>
   <http-interface security-realm="ManagementRealm">
      <socket-binding http="management-http" https="management-https"/>
   </http-interface>
</management-interfaces>

To support writing out legacy configs, the xsd allows a choice between 
the above "socket-binding" elements or a "socket" element

<management-interfaces>
   <native-interface security-realm="ManagementRealm">
     <socket address="management" port="9999"/>
   </native-interface>
   <http-interface security-realm="ManagementRealm">
      <socket address="management-http" port="9990" secure-port="12345"/>
   </http-interface>
</management-interfaces>

If configured this way, the socket-binding-group port-offset will not 
apply. We allow it in standalone.xml just for backward compatibility. 
However, the "address", "port" and "secure-port" attributes support 
expressions, so using expressions is another way to prevent port 
conflicts when multiple servers run on the same machine.

The other place <management-interfaces> are declared is in host.xml, for 
use by the HostController. The socket-binding-group is a server 
configuration notion, and isn't part of host.xml. So, for host.xml, only 
the 2nd configuration option (with the <socket> element) is allowed.


[1] https://github.com/jbossas/jboss-as/pull/640
[2] https://issues.jboss.org/browse/AS7-1476
-- 
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat


More information about the jboss-as7-dev mailing list