views:

534

answers:

2

I want to run JBoss 4.2.3 and JBoss 5.1 on the same server, but not simultaneously. I just need to be able to switch back and forth between the two for testing, so I don't need to change ports or anything like that. My problem is the JBOSS_HOME environment variable. When I set up a /soft/JBoss-4.2.3.GA directory and a /soft/JBoss-5.1.0.GA directory I can run the respective bin run.sh commands, however, both try to use the $JBOSS_HOME and $PATH environment variables which are set to the first installation (JBoss-4.2.3). So, how can I set separate environment variables? Or tell my new JBoss 5.1 installation to use another environment variable for JBOSS_HOME? How would I go about getting these two running together? Thanks!

+2  A: 

A fast solution would be to set the $JBOSS_HOME and $PATH variable within the run.sh to the appropiate directory of each JBoss instance.

Kosi2801
A: 

I had a similar problem recently and my workaround is a pair of wrapper scripts for each version of JBoss AS.

Ravi Algubelli