4.5.2.  Running multiple instances of JBoss AS binding to different local IP addresses

4.5.2.  Running multiple instances of JBoss AS binding to different local IP addresses

Each JBoss AS instance is bound to a particular IP address.

  1. Create a new file /etc/init.d/service-name which is a symlink to /etc/init.d/jbossas, e.g:

    ln -s /etc/init.d/jbossas /etc/init.d/jbossas-instance2
    
  2. Create a new config file for service-name, /etc/sysconfig/service-name with instance specific values uncommented and updated , e.g:

    cp /etc/sysconfig/jbossas /etc/sysconfig/jbossas-instance2. Uncomment and update JBOSSCONF to instance2. Create a new variable JBOSS_IP and set it to another IP address in /etc/sysconfig/jbossas-instance2

  3. Then add service-name for management by chkconfig, e.g:

    chkconfig --add jbossas-instance2
    
  4. To start/stop the service, simply: service service-name start/stop, e.g:

    service jbossas-instance2 start