3 Replies Latest reply on Jul 21, 2006 7:01 AM by timfox

    Using ServiceBindingManager with Messaging

    rtm333

      Hi,

      We would like to start several JBoss instances with Messaging on the same machine. This leads to a "port already in use" conflict for port 4457.

      Can this port be mapped with the ServiceBindingManager?

      Thanks for any hints.

        • 1. Re: Using ServiceBindingManager with Messaging
          timfox

          I don't think we currently support use of ServiceBindingManager for mapping ports.

          You can add a feature request on JIRA if you like.

          • 2. Re: Using ServiceBindingManager with Messaging
            timfox
            • 3. Re: Using ServiceBindingManager with Messaging
              timfox

              Please ignore my original post.

              Since the remoting connector is a MBean and the serverBindPort can be set, then ServiceBindingManager can *already* (no code changes required) be used to set the serverBindPort used by messaging.

              To do this, add the following (changing attributes as appropriate) in your bindings.xml file:

              <service-config name="jboss.messaging:service=Connector,transport=socket"
               delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
               <delegate-config>
               <attribute name="Configuration"><![CDATA[
               <config>
               <invoker transport="socket">
               <attribute name="marshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute>
               <attribute name="unmarshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute>
               <attribute name="serializationtype" isParam="true">jboss</attribute>
               <attribute name="dataType" isParam="true">jms</attribute>
               <attribute name="socket.check_connection" isParam="true">false</attribute>
               <attribute name="timeout">0</attribute>
               <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
               <attribute name="serverBindPort">7544</attribute>
               <attribute name="leasePeriod">20000</attribute>
               </invoker>
               <handlers>
               <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
               </handlers>
               </config>]]>
               </attribute>
               </delegate-config>
              
               <binding port="7544"/>
               </service-config>
              


              Then enable ServiceBindingManager in conf/jboss-service.xml and it all should work.