Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

changing the port number on JBOSS

  Asked By: Jimmy    Date: Jan 08    Category: Java    Views: 3431

I had resin as webserver on my system which i already setup and was
working fine on the port no 8080.
Now,I recently installed jboss-4.0.3SP1 on my system.
Now when i want both the servers at a time to run , i think i need to
change the port number of JBOSS to some other than 8080.
Can any one suggest how to change the port numbers on JBOSS.
I even tried figureing out whether there is any entry in the
jboss-services.xml file and could not find the entry regarding the
port number.



2 Answers Found

Answer #1    Answered By: Riley-jack Johnson     Answered On: Jan 08

For jboss  HTTP port  see this file:

Both simple http port(8080) and compressed ajp port(8009), is defined in
this file.
I know this uri looks a little bit strange, but this is because of JBoss's
architecture which is a JMX micro kernel, and every thing else(even web),
is deployed in the form of JMX MBeans. (see .sar extention).

Answer #2    Answered By: Kawthar Malik     Answered On: Jan 08

Its not enough to change the HTTP port, u need to change a lot of
ports for run 2 jboss  instances in same mashin.
There's a preconfigured service in JBoss server/config-name/conf
directory that you can use to easily assign different ports to all
services in JBoss. Locate a ServiceBindingManager service in your
conf/jboss-service.xml file.

<mbean code="org.jboss.services.binding.ServiceBindingManager"
<attribute name="ServerName">ports-01</attribute>
<attribute name="StoreURL">../docs/examples/binding-
<attribute name="StoreFactoryClassName">
This service points to a sample-bindings.xml file in the docs
directory that contains a sample of two separate port  configurations
for JBoss. By using the ServiceBindingManager all the port
configuration information in your server instance's configuration
files are overridden from this template. E.g. ports-01 configuration
for JBoss node 1 and ports-02 configuration for server node2.

Didn't find what you were looking for? Find more on changing the port number on JBOSS Or get search suggestion and latest updates.