Several JBoss in the same server

From OpenKM Documentation
Jump to: navigation, search

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:

./ -b

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:service=Naming 1098, 1099 1198, 1199 JNDI
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3 3873 3973 EJB3
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=jrmpha 4444 4544 Clusters
jboss:service=invoker,type=pooledha 4448 4548 Clusters
jboss:service=CorbaORB 3528 3628 CORBA
jboss.jmx:type=Connector,name=RMI 19001 19101 RMI
jboss.jmx:name=SnmpAgent,service=trapd,type=logger 1162 1262 SNMP
jboss.jmx:name=SnmpAgent,service=snmp,type=adaptor 1161 1261 SNMP,type=UIL2 8093 8193 JMS,type=HTTP 8080 8180 JMS-HTTP,name=HAJNDIJMSProvider 1100 1200 HA JMS (MAKE SURE java.naming.provider.url PORT IS SAME AS HA-JNDI ABOVE)
jboss.web:service=WebServer 8080, 8443 8180, 8543 HTTP Web Server
jboss.messaging:service=Connector,transport=bisocket 4457 4557 JBoss Messaging

Nota clasica.png 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 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/ -s jnp://localhost:1099

And for the second instance, use this command:

./bin/ -s jnp://localhost:1199

More info at: