Wednesday, June 19, 2013

Running 2 or more JBOSS in same machine:

To run 2 or more instance of jboss follow the following step:
  1. First you need different installation location to run the another instance of the JBOSS. (assumption is that you already have a default instance running)
  2. This this example we are setting up jboss 5.1.0 as separate instance
  3. Go to bin : “jboss-5.1.0.GA\bin” and open “run.bat”
  4. Replace all the variable “%JBOSS_HOME%” with the direct path to your installation directory ie “jboss-5.1.0.GA”
if exist "%JBOSS_HOME%\bin\run.jar" (
if "x%JAVAC_JAR%" == "x" (
set "RUNJAR=%JAVAC_JAR%;%JBOSS_HOME%\bin\run.jar"
) else (
set "RUNJAR=%JBOSS_HOME%\bin\run.jar"
)
) else (
echo Could not locate "%JBOSS_HOME%\bin\run.jar".
echo Please check that you are in the bin directory when running this script.
goto END
)
With

if exist “<direct poath to jboss home>bin\run.jar" (
if "x%JAVAC_JAR%" == "x" (
set "RUNJAR=%JAVAC_JAR%;<direct poath to jboss home>\bin\run.jar"
) else (
set "RUNJAR=<direct poath to jboss home>\bin\run.jar"
)
) else (
echo Could not locate "<direct path to jboss home>\bin\run.jar".
echo Please check that you are in the bin directory when running this script.
goto END
)

  1. Run “run.bat”
[For other version of installation eg: jbosss 7, you can do the same thing,, ie go to “din/standlone.bat” and do 4)]

No comments:

Post a Comment