Several JBoss in the same server
Using multiple IPs
If your server has several IP addresses assigned, the preferred solution is to use the -b command line option to bind each instance of JBoss AS to a particular IP address:
./run.sh -b 192.168.0.10
See also:
Only one IP
Modify $JBOSS_HOME/server/default/conf/jboss-service.xml and uncomment the "Service Binding" section and select a "ServerName" value from sample-bindings.xml. See $JBOSS_HOME/docs/examples/binding-manager/sample-bindings.xml "ports-default" entries for all JBoss port properties.
Service | Default port | New Port | Description |
---|---|---|---|
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3 | 3873 | 3973 | EJB3 |
jboss:service=Naming | 1098, 1099 | 1198, 1199 | JNDI |
jboss:service=WebService | 8083 | 8183 | web service |
jboss:service=invoker,type=jrmp | 4444 | 4544 | |
jboss:service=invoker,type=pooled | 4445 | 4545 | |
jboss:service=HAJNDI | 1100, 1101 | 1200, 1201 | HA JNDI / clusters |
jboss:service=invoker,type=pooledha | 4448 | 4548 | clusters |
jboss.jmx:type=Connector,name=RMI | 19001 | 19101 | RMI |
jboss:service=CorbaORB | 3528 | 3628 | Corba |
jboss.jmx:name=SnmpAgent,service=trapd,type=logger | 1162 | 1262 | SNMP |
jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor | 1161 | 1261 | SNMP |
jboss.mq:service=InvocationLayer,type=UIL2 | 8093 | 8193 | JMS |
jboss.mq:service=InvocationLayer,type=HTTP | 8080 | 8180 | JMS HTTP |
jboss.mq:service=JMSProviderLoader,name=HAJNDIJMSProvider | 1100 | 1200 | HA JMS |
jboss.web:service=WebServer | 8080, 8443 | 8180, 8543 | HTTP web server |
jboss.messaging:service=Connector,transport=bisocket | 4457 | 4557 | JBoss Messaging |
By default there are several port mappings alredy defined which can be used: ports-default, ports-01, ports-02 and ports-03. |
To shutdown the different instances execute the shutdown.sh script from the $JBOSS_HOME/bin directory with extra arguments. If you have configured 2 instances of JBoss, one on port 1099 (the NamingService port) and another on 1199, then in order to shutdown the first JBoss instance use this command:
./bin/shutdown.sh -s jnp://localhost:1099
And for the second instance, use this command:
./bin/shutdown.sh -s jnp://localhost:1199
More info at: