1 Reply Latest reply on Oct 14, 2014 7:12 AM by wdfink

    Change JBOSS 5.1 default port for multiple instances

    sachin.kataria

      Hi,

       

      We are using JBOSS 5.1 server. We have created 5 instances of JBOSS - jboss-ports-01  --  jboss-ports-05 on same machine.

      We want to change the default port and we want to set it as per our requirement (not as per the offset), so there are 2 ways to do that

       

      1. Update server.xml file at /opt/jboss/server/jboss-ports-01/deploy/jbossweb.sar

       

      <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"

                     maxThreads="275" connectionTimeout="20000" redirectPort="8443" />

      Updated port to 9091

       

      Another way

      2. Update bindings-jboss-beans.xml file at /opt/jboss/server/jboss-ports-01/conf/bindingservice.beans/META-INF

      (Need to set offset parameter for each instance)

       

      My Query is -

       

      1. I want to know which is preferable (server.xml or  bindings-jboss-beans.xml) ? which is the best way to change default port ?

      2. In bindings-jboss-beans.xml, need to do below steps for each instance

          2.1  comment out/remove the <!-- <inject bean="Ports02Bindings"/> --> and keep required instance only

          2.2  comment out/remove the  <bean name="Ports02Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet"> and keep required beans only.

       

          so do we need to update the <parameter>${jboss.service.binding.set:ports-default}</parameter> also ? ports-default  to  jboss-ports-01 ?? I saw that without updating this also, server is started.

       

      3. when to use which option ? (server.xml or  bindings-jboss-beans.xml)

       

       

      Thanks

        • 1. Re: Change JBOSS 5.1 default port for multiple instances
          wdfink

          I would use the bindings as this are meant for it. This ensure that the settings in different configurations are changed correctly.

          Maybe you don't have the necessity to do it for this exact change, but it prevent from trouble if there are changes if you upgrade.

          On the other hand side you have the port changes for all services in one place.