Peter Johnson [
http://community.jboss.org/people/peterj] created the discussion
"Re: Running Multiple JVMs as Windows Services on a Single System"
To view the discussion, visit:
http://community.jboss.org/message/586069#586069
--------------------------------------------------------------
I was going to say that this could be easily done, but changed my mind (not that it can;t
be done, but it is a little more work). But I first have to tell you how it works before
you will understand the issue. Service.bat registers jbosssvc.exe as a service. Thus when
the service starts, jbosssvc.exe runs. jbosssvc.exe in truns runs service.bat (or a
renamed version thereof, provided you mad the approriate changes in service.bat). As far
as I know there is no way to also specify a parameter to pass to service.bat.
So, if you grabbed the source for jbosssvc.bat and made the appropriate changes, you could
possibly do what you want. You would also want to change the service registration code in
service.bat to paramerize the "instance" value (so that you could register
instances with the single service.bat). And of course change service.bat to read in the
instance configuration file. You might also have to play with the current working
directory in jbosssvc.exe so that it can easily find the config files.
But consider what I did - I have a single service.bat source file. I have various
configurations that currently are in a single ant script but could easily be pulled into
separate ant properties file. I run the ant script, which reads the properties files and
builds the run-time service.bat files for me. I never edit the run-time service.bat files
- if I need to make changes I modify the properties and regenerate the runtime files.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/586069#586069]
Start a new discussion in Beginner's Corner at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]