-
1. Re: Different versions of JBoss on the same host
peterj Mar 31, 2010 10:49 AM (in response to vladimirbezugliy)Do not set JBOSS_HOME! Let the run script set it for you. Then it will pick up the correct JARs. I have dozens of copies of JBoss AS on my PC, of various different versions, and they all run just fine - I just go to the bin directory of the one I want and run its run script. So you should run the 5.1 version like this:
cd C:\JBoss51\bin
run -Djboss.service.binding.set=ports-01And this should also work:
C:\JBoss51\bin\run -Djboss.service.binding.set=ports-01
-
2. Re: Why do we need jboss.home.dir/jboss.home.url properties?
vladimirbezugliy Apr 1, 2010 7:28 AM (in response to peterj)Unfortunately JBOSS_HOME can be set by SE team on production environment.
And I cannot remove this environment variable.
So I should redefine either JBOSS_HOME or jboss.home.dir/jboss.home.url properties. Or both.
Now I redefining jboss.home.dir/jboss.home.url properties only.
And I need to know - is it enough?
Or I have to redefine environment variable JBOSS_HOME in my startup script too?
-
3. Re: Different versions of JBoss on the same host
peterj Mar 31, 2010 11:42 AM (in response to vladimirbezugliy)The correct solution is to tell the SE(?) team to not set JBOSS_HOME in the production environment.
The best workaround is to change the run scripts to comment out the check of whether JBOSS_HOME is already set and to always set it based on the script location:
#if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=`cd $DIRNAME/..; pwd`
#fi
export JBOSS_HOME -
4. Re: Why do we need jboss.home.dir/jboss.home.url properties?
vladimirbezugliy Apr 1, 2010 7:28 AM (in response to peterj)I do not think that it is a good idea to modify any files from jboss_home\bin directory.
-
5. Re: Different versions of JBoss on the same host
peterj Mar 31, 2010 12:10 PM (in response to vladimirbezugliy)Well, when you refuse to use the correct solution you have to settle for a workaround.
Try this instead. Create a new script in the bin that contains:
JBOSS_HOME=`cd $DIRNAME/..; pwd`
./run.sh-Djboss.service.binding.set=ports-01
Then tell the SE team to start the app server using that script instead of run.sh.
By the way, are you really manually starting Jboss AS in the production environment? I would have thought that you would start it a a service/daemon.
-
6. Re: Why do we need jboss.home.dir/jboss.home.url properties?
vladimirbezugliy Apr 1, 2010 7:28 AM (in response to peterj)I do not understand - why there are jboss.home.dir, jboss.home.url properties if we can just redefine JBOSS_HOME or start jboss from directory where JBoss was installed?
-
7. Re: Why do we need jboss.home.dir/jboss.home.url properties?
peterj Apr 1, 2010 8:24 AM (in response to vladimirbezugliy)JBOSS_HOME is used by the run scripts to locate the run,jar file. If jboss.home.dir is not set, then the app server uses the location of run.jar to set it.. From there it sets a number of other system properties, if they were not passed on the command line. You can easily see this in the source code for org.jboss.Main.
Therefore, you do not have to set anything - just run the run script and everything gets set automatically. Or you can set properties and override locations as you desire.
Also, those system properties are available to apps deployed to the app server.
-
8. Re: Different versions of JBoss on the same host
vladimirbezugliy Apr 1, 2010 8:56 AM (in response to vladimirbezugliy)What will be in case if JBOSS_HOME set to one directory but jboss.home.dir/jboss.home.url to different one?
Do we need such configuration in some cases?
-
9. Re: Different versions of JBoss on the same host
peterj Apr 1, 2010 9:12 AM (in response to vladimirbezugliy)I already answered the first question. For the second question: none that I can think of.