Archive for July, 2008

Configuring a web server instance with JBoss

Friday, July 4th, 2008

It is not hard to configure a jboss web server instance on the same machine with other instances. You might want to look at http://wiki.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOneMachine for explanation on why would you need it. To create a server instance copy default directory in jboss-xyz/server (or minimal if you are certain minimal server will do for you) and name it say my-webapp.  Go to your bin directory and copy run.bat (run.sh) and change the line:
“%JAVA%” %JAVA_OPTS% “-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%” -classpath “%JBOSS_CLASSPATH%” org.jboss.Main %*
to:
“%JAVA%” %JAVA_OPTS% “-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%” -classpath “%JBOSS_CLASSPATH%” org.jboss.Main -c my-webapp  %*

You might also have a -b option with your host name, like -b localhost as described in the article above. Now you also want you website to be on different port, not port 8080. To change the port, go to my-webapp/deploy/jbossweb-tomcatx.sar directory and change the ports there.