Each JBoss Application Server instance is bound to a particular IP address.
Create a new file /etc/init.d/ which is a symlink to service-name/etc/init.d/jbossas, e.g:
ln -s /etc/init.d/jbossas /etc/init.d/jbossas-instance2
Create a new config file for service-name, /etc/sysconfig/ with instance specific values uncommented and updated , e.g:
service-name
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
Then add service-name for management by chkconfig, e.g:
chkconfig --add jbossas-instance2
To start/stop the service, simply: service start/stop, e.g:
service-name
service jbossas-instance2 start