Running JBoss on a port other than 8080

Posted on Thursday, February 4, 2010


JBoss by default executes on port 8080. There are other hell lot of services which are run on different ports. JBoss provides an easy way of doing that. There is a file called bindings-jboss-beans.xml at the following location


         <!-- The name of the set of bindings to use for this server -->
<strong>         <parameter>${jboss.service.binding.set:ports-01}</parameter></strong>

         <!--  The binding sets -->
               <inject bean="Ports01Bindings"></inject>
               <inject bean="Ports02Bindings"></inject>
               <inject bean="Ports03Bindings"></inject>

         <!-- Base binding <span class="hiddenSpellError" pre="binding ">metadata</span> that is used to create bindings for each set -->
         <parameter><inject bean="StandardBindings"></inject></parameter>


This helps in offsetting all the ports by 100 because of the following

 <!-- The ports-01 bindings <span class="hiddenGrammarError" pre="bindings ">are obtained</span> by taking the base bindings and adding 100 to each port value -->
   <bean name="Ports01Bindings" class="">
         <!--  The name of the set -->
         <!-- Default host name -->
         <!-- The port offset -->
         <!-- Set of bindings to which the "offset by X" approach <span class="hiddenGrammarError" pre="approach ">can't be</span> applied -->

so instead of the default http://localhost:8080, now the app server would be running on http://localhost:8180

Posted in: Java