[jboss-user] [Beginner's Corner] - Re: Running Multiple JVMs as Windows Services on a Single System
Peter Johnson
do-not-reply at jboss.com
Mon Feb 7 18:07:45 EST 2011
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&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110207/3870e534/attachment.html
More information about the jboss-user
mailing list