2 Replies Latest reply on Aug 14, 2009 7:04 PM by jfillman

    Configuring multiple instances with ServiceBindingManager

      I have experience with multiple instances on jboss 4.2.1 through the use of the bindings.xml file.

      I've read through the docs on the new ServiceBindingManager in 5.1 and have a questions:

      I have a few custom port bindings that cannot be set using the port offset and therefore need to utilize the 4th parameter in there ServiceBindingSet. Specifically, i need to set the port that the HTTP tomcat listener listens on. What is the syntax for this? I cannot find any examples. The xml snippet below shows the configuration that i need help on.



      <!-- The name of the set -->
      ports-default
      <!-- Default host name -->
      ${jboss.bind.address}
      <!-- The port offset -->
      0
      <!-- Set of bindings to which the "offset by X" approach can't be applied -->


      WHAT GOES IN HERE !?!?!?!




        • 1. Re: Configuring multiple instances with ServiceBindingManage
          peterj

          If you run only one app server instance, just modify the port settings within the StandardBindings.

          But if you need multiple app servers and need specific setting for some ports, my guess is that you would use the same syntax used to define the individual port values in the StandardBindings bean:

          <bean name="MyCustomBindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
           <constructor>
           <!-- The name of the set -->
           <parameter>ports-default</parameter>
           <!-- Default host name -->
           <parameter>${jboss.bind.address}</parameter>
           <!-- The port offset -->
           <parameter>0</parameter>
           <!-- Set of bindings to which the "offset by X" approach can't be applied -->
           <parameter class="java.util.Collection">
           <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">80</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>
           </bean>
           </set>
           </parameter>
           </constructor>
           </bean>


          • 2. Re: Configuring multiple instances with ServiceBindingManage

            Thanks PeterJ.

            That was exactly what i was looking for.

            I had to change to just but once i did that, it worked perfectly.

            cheers,
            --james