Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4634

ServiceBindingManager defaults fixedHostName to false when a hostName is specified for a service binding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.0_CR2
    • EAP 5.0.1
    • System
    • None
    • Hide

      Fix the port on, say, the jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor service to localhost.. Start the server (all for snmp) using the eth0 IP address. Search for the port 1161 using netstat to see what ip address it is bound: netstat -nl | grep 1161.

      Show
      Fix the port on, say, the jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor service to localhost.. Start the server (all for snmp) using the eth0 IP address. Search for the port 1161 using netstat to see what ip address it is bound: netstat -nl | grep 1161.
    • Hide

      Set the fixedHostName property to "true" in the service binding.

      Show
      Set the fixedHostName property to "true" in the service binding.

    Description

      A user can specify a specific host in the <jboss-home>/server/<server-dir>/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml using a "hostName" property. So, for example, to fix the host to "someAddress" on the SNMP Adapter, one could configure

      <bean class="org.jboss.services.binding.ServiceBindingMetadata">
      <property name="serviceName">jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor</property>
      <property name="port">1161</property>
      <property name="hostName">someAddress</property>
      <property name="description">Socket for the SNMP adaptor MBean</property>
      </bean>

      However, when this is done, the default value is still used. To cause the specified value to be utilized, one must add the fixedHostName property, set to "true":

      <bean class="org.jboss.services.binding.ServiceBindingMetadata">
      <property name="serviceName">jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor</property>
      <property name="port">1161</property>
      <property name="hostName">someAddress</property>
      <property name="fixedHostName">true</property>
      <property name="description">Socket for the SNMP adaptor MBean</property>
      </bean>

      According to the wiki documentation [1], this should not be necessary: "fixedHostName – whether runtime ServiceBindings created from this metadata are not allowed to override the hostName property value to use the defaultHostName value from the specified ServiceBindingSet (see below). By default this is true if a hostName is configured, false otherwise."

      [1] http://community.jboss.org/wiki/AS5ServiceBindingManager

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            rhn-support-miclark Mike Clark
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: