How to change JBoss 5.1 default port

In order to run JBoss 5.1 with a different port from the default one (8080), an easy but efficient solution is to execute run.sh or run.bat with adding the following instruction on the command line:

-Djboss.service.binding.set=ports-01

To better understand what’s going on, just open file

{JBOSS_DIR}\{PROFILE}/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml

then look at the following lines:

As you can guess, ports-01 it nothing but a bean with mapped values:

where on the default port will be added the X offset of 100, and the listening HTTP port will result on a 8180 value.

PLEASE NOTICE

If you receiving some JNDI error (something like ‘can’t listen to 1099 port), you’ll probabily have an already deployed application that listen to this port;
remember to configure the application properties in the same way as above (i.e. the JNDI port will be the 1099)

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax