[jboss-user] [Installation, Configuration & Deployment] - Re: ServiceBindingSet

bstansberry@jboss.com do-not-reply at jboss.com
Mon Aug 24 12:23:55 EDT 2009

This comment needs to be fixed:

<!-- Set of bindings to which the "offset by X" approach can't be applied -->

Should be something more like this:

<!-- Set of bindings that are specific to this ServiceBindingSet -->


You then "fix" the port value (i.e. prevent the offset being applied) by setting the "fixedPort" property, same as you would for one of the elements in the StandardBindings set.

  |  <bean name="Ports03Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
  |       <constructor>
  |          <!--  The name of the set -->
  |          <parameter>ports-03</parameter>
  |          <!-- Default host name -->
  |          <parameter>${jboss.bind.address}</parameter>
  |          <!-- The port offset -->
  |          <parameter>400</parameter>
  |          <!-- Set of bindings to which the "offset by X" approach can't be applied -->
  |          <parameter>
  |             <set elementClass="org.jboss.services.binding.ServiceBindingMetadata">
  |                 <bean class="org.jboss.services.binding.ServiceBindingMetadata">
  |                     <property name="serviceName">jboss.web:service=WebServer</property>
  |                     <property name="port">8700</property>
  |                     <property name="description">JBoss Web HTTP connector socket; also drives the values for the HTTPS and AJP sockets
  | </property>
  |                     <property name="serviceBindingValueSourceConfig"><inject bean="JBossWebConnectorXSLTConfig"/></property>
  |                     <property name="fixedPort">true</property>
  |                 </bean>
  |                 <bean class="org.jboss.services.binding.ServiceBindingMetadata">
  |                     <property name="serviceName">jboss:service=Naming</property>
  |                     <property name="bindingName">Port</property>
  |                     <property name="port">1799</property>
  |                     <property name="description">The listening socket for the Naming service</property>
  |                     <property name="fixedPort">true</property>
  |                 </bean>
  |             </set>
  |         </parameter>
  |       </constructor>
  |    </bean>

That's admittedly non-intuitive. The code is written such that the "fixedPort" property controls whether the offset is applied, no matter where the ServiceBindingMetadata comes from. That could be changed, but we'd need to add a mechanism to allow people to say fixedPort=false on an override binding. For example, make the field a Boolean with a null default and add a isFixedPortSet() getter.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251246#4251246

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251246

More information about the jboss-user mailing list