-
1. Re: Explanation of commands in service.bat
peterj Sep 30, 2010 7:06 PM (in response to forumer)I don't know exactly what the -p does (perhaps it means 'print' and the digit that follows, 1, references stdout), but I suspect it tells jbossvc.exe to not create a service, and instead to just echo the text, and possibly other info, to the run.log.
Taking input from the lock file causes the file to be locked. This prevents the app server from being started twice (the second attempt to run it would pause waiting for the file to become available).
If you are attempting to run two JBoss AS services, then you need to rename a lot of things in the file to prevent collisions (the r.lock file being just one of them). I have reworked the service.bat file to place all such information at the top of the file where it is easy to change (and have the change reflected throughout the file). I can post a link if you like.
-
2. Re: Explanation of commands in service.bat
forumer Sep 30, 2010 8:14 PM (in response to peterj)At what point does the file become unlocked? After JBoss is stopped and is that when the second "Jbosssvc.exe -p 1 ..." is run after which lock file is deleted?
Please post the "link" you mentioned.
Thank You!
-
3. Re: Explanation of commands in service.bat
peterj Oct 1, 2010 11:00 AM (in response to forumer)The r.lock file is locked as long as run.bat is active. Once run.bat exits, the lock is released. Note that this happens before the second jbossvc.exe run.
The link: get the source code for JBoss in Action (http://www.manning.com/jamae) from http://code.google.com/p/jbia/ . In ch15, target 04 generates two services. The source for the service.bat file is at ch15/src/service/windows.