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

    Using ServiceBindingManager with Messaging

    Ralf Torsten Menche Newbie


      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
          Tim Fox Master

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

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

          • 3. Re: Using ServiceBindingManager with Messaging
            Tim Fox Master

            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"
             <attribute name="Configuration"><![CDATA[
             <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>
             <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
             <binding port="7544"/>

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