-
1. Re: Q: Launch JBoss 4.2.1.GA as a Windows service via Native
peterj Aug 23, 2007 12:07 PM (in response to christfollower)Any agrument that you pass to run.bat at passed to the app server as the token "%*" at ther end of line 114:
"%JAVA%" %JAVA_OPTS% ... org.jboss.Main %*
Simply change the %* to reflect your desired options:
"%JAVA%" %JAVA_OPTS% ... org.jboss.Main -c WEBAPP -
2. Re: Q: Launch JBoss 4.2.1.GA as a Windows service via Native
peterj Aug 23, 2007 12:25 PM (in response to christfollower)Another possibility is to modify the service.bat file for the cmdStart label as follows:
:cmdStart
REM Executed on service start
call run.bat -c WEBAPP >run.log
goto cmdEnd
This change is better because it leaves the run.bat as it. -
3. Re: Q: Launch JBoss 4.2.1.GA as a Windows service via Native
christfollower Aug 23, 2007 12:47 PM (in response to christfollower)Peter,
Thank you for responding. Please let me know if my understanding is accurate.
If I want to run multiple servers, I will need to create multiple service_xxx.bat. In each bat file, I will give a new SVCNAME, SVCDISP, modify the cmdInstall to pass in service_xxx.bat and -c xxx and modify cmdRestart to pass in -c xxx. Then run the service_xxx.bat install to create each service.
Am I on the right track here? -
4. Re: Q: Launch JBoss 4.2.1.GA as a Windows service via Native
peterj Aug 23, 2007 12:54 PM (in response to christfollower)Yes, that is what I did. I also renamed the *.log files generated by service_*.bat so each service creates its own logs.
If you plan to run all of the services at the same time then you will also have to be concerned with port conflicts. See http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfiguringMultipleJBossInstancesOnOneMachine
You will also have to modify the parameters shutdown.bat (within service_*.bat) to shut down the correct service. Look at the -s option (run shutdown.bat without any parameters to get the help text). -
5. Re: Q: Launch JBoss 4.2.1.GA as a Windows service via Native
christfollower Aug 24, 2007 9:00 AM (in response to christfollower)I still need some help here with shutdown.
I am able to use shutdown -S (uppercase) to shutdown a server. But, I cannot figure out the correct syntax for shutdown -s (lowercase).
If I started a server with run.bat -c MYAPP1 and run.bat -c MYAPP2, what are the correct shutdown command syntax? shutdown -s MYAPP1? shutdown -s server=MYAPP1?
Thanks again. -
6. Re: Q: Launch JBoss 4.2.1.GA as a Windows service via Native
peterj Aug 24, 2007 11:47 AM (in response to christfollower)The -s option takes a URL that includes the host name and the port for JNDI. In a default installation that would be "-s localhost:1099".
Unlike run, which needs to know the directory containing the server to start, shutdown needs to know where the server is listening so that it can get the jboss.system:type=Server MBean.