The JBoss Enterprise Web Platform 5 comes with the necessary files to configure the server to run as a service under Windows. Distributed with JBoss Native, this enables the JBoss Enterprise Web Platform 5 to be run as a service on a Windows operating system. To install the service navigate to
$JBOSS_HOME/jboss-as-web/bin and locate the service.bat file. Run the following command in a command prompt:
./service.bat install
This commands installs the JBoss Enterprise Web Platform as a service. Under the Windows services list you will find this listed by the short name
JBAS50SVC and the long name JBoss Application Server 5.1.
Once the service is installed successfully, you can control and configure the service from the
Windows Services Manager application. You can configure it to start automatically when the system is booted. You can even manually start and stop the service from the Windows Services Manager.
If you want to pass parameters to the server (for example,
-b, -c) when running it as a service, you can do so by editing the service.bat to include these parameters:
call run.bat -c default -b localhost < .r.lock >> run.log 2>&1
Important
Add these parameters at both places where
run.bat appears in the service.bat file.