Different versions of JBoss on the same host

Posted by Vladimir Bezugliy on Stack Overflow See other posts from Stack Overflow or by Vladimir Bezugliy
Published on 2010-03-31T09:45:02Z Indexed on 2010/03/31 11:33 UTC
Read the original article Hit count: 449

Filed under:
|

I have JBoss 4 installed on my PC to directory C:\JBoss4
And environment variable JBOSS_HOME set to this directory:

JBOSS_HOME=C:\JBoss4  

I need to install JBoss 5.1 on the same PC.
I installed it into C:\JBoss51
In order to start JBoss 5.1 on the same host where JBoss 4 was already started, I need to redefine properties jboss.home.dir, jboss.home.url, jboss.service.binding.set:

C:\JBoss51\bin\run.sh -Djboss.home.dir=C:/JBoss51 \
                      -Djboss.home.url=file:/C:/JBoss51 \
                      -Djboss.service.binding.set=ports-01

But in C:\JBoss51\bin\run.sh I can see following code:

…
if [ "x$JBOSS_HOME" = "x" ]; then
    # get the full path (without any relative bits)
    JBOSS_HOME=`cd $DIRNAME/..; pwd`
fi
export JBOSS_HOME
…
runjar="$JBOSS_HOME/bin/run.jar"
JBOSS_BOOT_CLASSPATH="$runjar"

And this code does not depend either on jboss.home.dir or on jboss.home.dir.
So when I start JBoss 5.1 script will use jar files from JBoss 4.3?
Is it correct?
Should I redefine environment variable JAVA_HOME when I start JBoss 5.1?
In this case script will use correct jar files.
Or if I redefined properties jboss.home.dir, jboss.home.url then JBoss will not use any variables set in run.sh?

How does it works?

© Stack Overflow or respective owner

Related posts about jboss

Related posts about jboss5.x