...
Anchor | ||||
---|---|---|---|---|
|
This article will show you how to configure Apache Geronimo server to run as a Microsoft Windows service. Currently, there are two options for running the server as a Windows service: using Apache Commons Daemon or using Java Service Wrapper.
Apache Commons Daemon
To set up Apache Geronimo server to run as a Microsoft Windows service using Apache Commons Daemon you will need to install the procrun plugin. Use the Administrative Console or deployer tool to install the plugin. Search for plugin named "Windows Service Wrapper".
...
For example:
No Format bgColor #000000 borderStyle solid
D:\geronimo-tomcat6-javaee5-2.2\bin>service_pr.bat remove
The service 'geronimosrv' has been removed.
Java Service Wrapper
A Java Service Wrapper will be required as an additional software to achieve this configuration. Using a service wrapper gives you some additional "control" on the service you are configuring such as the ability to ping the service and take action if the service is down.
Software Prerequisites
To set up Apache Geronimo server to run as a Microsoft Windows service you will certainly need a Java Service Wrapper. For this example we used Java Service Wrapper 3.2.3 available for download at the following URL:
...
http://geronimo.apache.org/downloads.html
Installing Apache Geronimo
Follow the normal process for installing Apache Geronimo. Instructions are located at Apache Geronimo Quickstart. Basically extract the zip file to a directory of your convenience. Throughout the rest of the article this directory will be referred to as <geronimo_home>.
Installing the Java Service Wrapper
Follow the instructions for installing Java Service Wrapper. Once you download the right version for your environment you extract the zip file to a directory of your convenience. Throughout the rest of the article this directory will be referred to as <jsw_home>.
...
<geronimo_home>/bin/g_service.bat
<geronimo_home>/bin/Install_Geronimo_NT.bat
<geronimo_home>/bin/Uninstall_Geronimo_NT.bat
<geronimo_home>/var/config/wrapper.conf
Configuring the Wrapper
The Java Service Wrapper comes with a sample configuration file wrapper.conf pre-configured to run a test script also provided, this file located in the <jsw_home>\conf directory. In this section we provide a Geronimo specific wrapper.conf file for your convenience.
...
The next step is to actually install the service so it can be picked up at Windows start time as well as managed along with the other existing services.
Installing/Removing the service
The following two batch files are provided to install and remove Geronimo as a Windows service. Create the files in the <geronimo_home>/bin
directory and copy the content as depicted in the following examples.
...