1 Reply Latest reply: Jun 7, 2011 10:21 AM by Peter Johnson RSS

Questions on multiple server profiles

Matt Accola Newbie

In my company it is very typical for us to download one copy of JBoss AS and then setup multiple profiles under the deploy directory. Setting up the multiple profiles is easy but the documentation is not clear about how to do the following:

 

a) Configure the parameters to run.bat

 

I understand that in JBoss AS 6 there is a run.conf.bat that can be used to configure run.bat without having to edit run.bat itself.  This is a good idea but the problem is that when you have multiple server profiles you apparently need to make multiple copies of run.bat and run.conf.bat and then edit run.bat to read from the corresponding run.conf.bat. It is certainly do-able but just seems "hacky" to me. Is this the correct way to do it or is there a better way? Also, why is run.conf.bat not even mentioned in any of hte JBoss AS documentation...it seems like it would be a good thing to document...I just stumbled on it by accident.

 

b) Setup a Windows service

 

I understand that in JBoss AS 6 there is a service.bat that can be used to install/uninstall a JBoss server as a Windows service. This is a good idea but again the problem comes when I need one Windows service per server profile. For each server profile I need to make a copy of service.bat and edit various parts of it. It is do-able but it feels "hacky" to me. Is this the correct way to do it or is there a better way? Why is service.bat not mentioned in the JBoss AS documentation...it seems like it would be a good thing to document.

 

When I say that run.conf.bat and service.bat are not mentioned in the JBoss AS documentation I am referring to the following documents:

 

http://docs.jboss.org/jbossas/docs/Installation_And_Getting_Started_Guide/5/html_single/index.html

 

http://docs.jboss.org/jbossas/docs/Administration_And_Configuration_Guide/5/html_single/index.html

 

Maybe I'm not looking at the correct documenation? I couldn't find any installation or configuration guide for JBoss AS 6 at all. Can you point me to the correct documenation?

  • 1. Re: Questions on multiple server profiles
    Peter Johnson Master

    This is pure speculation but up until 5.0 there was no run.conf.bat. However for Linux there was run.sh and run.conf so someone created run.conf.bat on Windows to align it closer to Linux. And in typical open source fashion, that person didn't think that documentation was necessary (after all, if you want to know how anything work. read the source).

     

    1) Yes, this is the correct way to do this.

     

    2) The service.bat file needs major rewritting to work happily in a multiple service environment. To see what I use, grab the source code for JBoss in Action (http://www.manning.com/jamae/) and look at ch15/src/service/windows/service.bat. This file is set up such that you can set all configuration items at the top of the file (rather than changing the same things all over the place). You do, of course, have to make a copy of the file, one for each service.

     

    In this regard, AS 6 and 5.x work the same.