geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.2 > Running Geronimo as a Windows Service
Date Thu, 02 Dec 2010 08:14:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC22&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Running+Geronimo+as+a+Windows+Service">Running
Geronimo as a Windows Service</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >The Java Service Wrapper has a sample
configuration file [^wrapper.conf], which is pre-configured to run a test script. This file
is located in the *&lt;jsw_home&gt;/conf* directory. In this section we provide a
Geronimo specific wrapper.conf file for your convenience. <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >Create the configuration file
as illustrated in the following example and place it in the *&lt;geronimo_home&gt;/var/config/wrapper.conf*
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">directory.
In this way we can</span> <span class="diff-added-words"style="background-color:
#dfd;">directory to</span> keep all the wrapper files within Geronimo&#39;s directory
structure. <br></td></tr>
            <tr><td class="diff-unchanged" >{noformat:borderStyle=solid|title=wrapper.conf}
<br># Location of java.exe (in Windows) <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
        </table>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC22/Running+Geronimo+as+a+Linux+service"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC22/Running+Geronimo+as+a+Linux+service">Running
Geronimo as a Linux service</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC22/Running+Geronimo+as+a+service"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC22/Running+Geronimo+as+a+service">Running Geronimo as
a service</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;</td></tr></table></div>
<p><a name="RunningGeronimoasaWindowsService-top"></a><br/>
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
<b>Apache Commons Daemon</b> or using <b>Java Service Wrapper</b>.</p>

<h1><a name="RunningGeronimoasaWindowsService-ApacheCommonsDaemon"></a>Apache
Commons Daemon</h1>

<h2><a name="RunningGeronimoasaWindowsService-SoftwarePrerequisites"></a>Software
Prerequisites</h2>

<p>Microsoft .NET Framework Version 2.0+. For example, Version 2.0 is available for
download at the following URL:<br/>
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;displaylang=en"
class="external-link" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&amp;displaylang=en</a></p>

<h2><a name="RunningGeronimoasaWindowsService-InstallingApacheCommonsDaemon"></a>Installing
Apache Commons Daemon</h2>

<p>To set up Apache Geronimo server to run as a Microsoft Windows service using Apache
Commons Daemon you will need to install the <b>procrun</b> plugin. Use the Administrative
Console or deployer tool to install the plugin from the plugins repository. For example, on
server 2.2, choose the <a href="http://geronimo.apache.org/plugins/geronimo-2.2/" class="external-link"
rel="nofollow">http://geronimo.apache.org/plugins/geronimo-2.2/</a> repository and
search for plugin named "<b>Windows Service Wrapper</b>".</p>

<h2><a name="RunningGeronimoasaWindowsService-UsingApacheCommonsDaemon"></a>Using
Apache Commons Daemon</h2>

<p>Once the plugin is installed you can install Apache Geronimo server as a Windows
service by running the following command:</p>

<p><tt><b>&lt;geronimo_home&gt;\bin\service_pr.bat install</b></tt></p>

<p>For example:<br/>
<font color="white"><div class="preformatted panel" style="border-style: solid;border-width:
1px;"><div class="preformattedContent panelContent">
<pre>D:\geronimo-tomcat6-javaee5-2.2\bin&gt;service_pr.bat install
The service "geronimosrv" has been installed.
</pre>
</div></div></font>
<br class="atl-forced-newline" /></p>

<p>This will create a Geronimo service for the server with the name "<b>geronimosrv</b>"
with default parameters. You can start/stop the Geronimo service using Windows' <tt><b>Services</b></tt>
tool or by using <tt><b>&lt;geronimo_home&gt;\bin\geronimosrvw.exe</b></tt>
tool. </p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td>By default the Geronimo service
is be configured with "<b>manual</b>" startup type. Use Windows' <tt><b>Services</b></tt>
tool or <tt><b>geronimosrvw.exe</b></tt> command to configure it to
"automatic" if needed.

<p>Default admin account "system" with password "manager" is used to shut down the service.
Change this setting with the geronimosrvw.exe tool (in the "Shutdown" tab) if the default
admin account is changed.</p>

<p>JAVA_OPTS and GERONIMO_OPTS environment variables are NOT read by the service_pr.bat
script. If you need to add any options that shall be used to start/stop the service, you can
use the geronimosrvw.exe tool to add them to the command line arguments in the "Startup" and/or
"Shutdown" tab. You can also use the geronimosrv.exe command to do that.</p>

<p>For more help on how to use the geronimosrv.exe and geronimosrvw.exe command, refer
to <a href="http://commons.apache.org/daemon/procrun.html" class="external-link" rel="nofollow">Apache
Commons Daemon manual</a>.</p></td></tr></table></div>
<p>To remove the Apache Geronimo service run the following command:</p>

<p><tt><b>&lt;geronimo_home&gt;\bin\service_pr.bat remove</b></tt></p>

<p>For example:<br/>
<font color="white"><div class="preformatted panel" style="border-style: solid;border-width:
1px;"><div class="preformattedContent panelContent">
<pre>D:\geronimo-tomcat6-javaee5-2.2\bin&gt;service_pr.bat remove
The service 'geronimosrv' has been removed.
</pre>
</div></div></font></p>

<h1><a name="RunningGeronimoasaWindowsService-JavaServiceWrapper"></a>Java
Service Wrapper</h1>

<p>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 <b>ping</b> the service and take action
if the service is down.</p>

<h2><a name="RunningGeronimoasaWindowsService-SoftwarePrerequisites"></a>Software
Prerequisites</h2>

<p>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:</p>

<p><a href="http://sourceforge.net/projects/wrapper/" class="external-link" rel="nofollow">http://sourceforge.net/projects/wrapper/</a></p>


<h2><a name="RunningGeronimoasaWindowsService-InstallingtheJavaServiceWrapper"></a>Installing
the Java Service Wrapper</h2>

<p>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 <b>&lt;jsw_home&gt;</b>.</p>

<p>For this particular example we will try to locate all the wrapper related files within
the Geronimo directory structure, so we will have to copy some files over.</p>

<p>Once you install the wrapper, copy the items as indicated in the following table.</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Source </th>
<th class='confluenceTh'> Destination </th>
</tr>
<tr>
<td class='confluenceTd'> <tt>&lt;jsw_home&gt;/bin/wrapper.exe</tt>
</td>
<td class='confluenceTd'> <tt>&lt;geronimo_home&gt;/bin/wrapper.exe</tt>
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>&lt;jsw_home&gt;/lib/wrapper.jar</tt>
</td>
<td class='confluenceTd'> <tt>&lt;geronimo_home&gt;/lib/wrapper.jar</tt>
</td>
</tr>
<tr>
<td class='confluenceTd'> <tt>&lt;jsw_home&gt;/lib/wrapper.dll</tt>
</td>
<td class='confluenceTd'> <tt>&lt;geronimo_home&gt;/lib/wrapper.dll</tt>
</td>
</tr>
</tbody></table>
</div>

<p>Create the following files under their specified directories according to the instructions
in the <a href="#RunningGeronimoasaWindowsService-ConfiguringtheWrappe">Configuring
the Wrappe</a> section. You can also download the files directly and placed them at
the given locations.</p>
<ul>
	<li><tt>&lt;geronimo_home&gt;/bin/<a href="/confluence/download/attachments/93434/g_service.bat?version=1&amp;modificationDate=1205797973000">g_service.bat</a></tt></li>
	<li><tt>&lt;geronimo_home&gt;/bin/<a href="/confluence/download/attachments/93434/Install_Geronimo_NT.bat?version=1&amp;modificationDate=1205797956000">Install_Geronimo_NT.bat</a></tt></li>
	<li><tt>&lt;geronimo_home&gt;/bin/<a href="/confluence/download/attachments/93434/Uninstall_Geronimo_NT.bat?version=1&amp;modificationDate=1205797944000">Uninstall_Geronimo_NT.bat</a></tt></li>
	<li><tt>&lt;geronimo_home&gt;/var/config/<a href="/confluence/download/attachments/93434/wrapper.conf?version=1&amp;modificationDate=1231198725000">wrapper.conf</a></tt></li>
</ul>


<h2><a name="RunningGeronimoasaWindowsService-ConfiguringtheWrapper"></a>Configuring
the Wrapper</h2>

<p>The Java Service Wrapper has a sample configuration file <a href="/confluence/download/attachments/93434/wrapper.conf?version=1&amp;modificationDate=1231198725000">wrapper.conf</a>,
which is pre-configured to run a test script. This file is located in the <b>&lt;jsw_home&gt;/conf</b>
directory. In this section we provide a Geronimo specific wrapper.conf file for your convenience.</p>

<p>Create the configuration file as illustrated in the following example and place it
in the <b>&lt;geronimo_home&gt;/var/config/wrapper.conf</b> directory
to keep all the wrapper files within Geronimo's directory structure.</p>
<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style:
solid;"><b>wrapper.conf</b></div><div class="preformattedContent panelContent">
<pre># Location of java.exe (in Windows)

wrapper.java.command=&lt;java_home&gt;/bin/java

# These additional parameters are required to start the server since we are not setting any
# environment variables prior to running the wrapper.

wrapper.java.additional.1=-javaagent:"&lt;geronimo_home&gt;/bin/jpa.jar"
wrapper.java.additional.2=-Djava.ext.dirs="&lt;geronimo_home&gt;/lib/ext;&lt;java_home&gt;/jre/lib/ext"
wrapper.java.additional.3=-Djava.endorsed.dirs="&lt;geronimo_home&gt;/lib/endorsed;&lt;java_home&gt;/jre/lib/endorsed"
wrapper.java.additional.4=-Dorg.apache.geronimo.home.dir="&lt;geronimo_home&gt;"
wrapper.java.additional.5=-Djava.io.tmpdir="&lt;geronimo_home&gt;/var/temp"

# Classpath

wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../bin/server.jar


# Location of the wrapper.dll (in Windows)

wrapper.java.library.path.1=../lib

# Main class the wrapper will use.

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Geronimo start class and parameters.

wrapper.app.parameter.1=org.apache.geronimo.cli.daemon.DaemonCLI

# Log settings.

wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=../var/log/wrapper.log
wrapper.logfile.format=LPTM
wrapper.logfile.loglevel=INFO
wrapper.logfile.maxsize=0
wrapper.logfile.maxfiles=0
wrapper.syslog.loglevel=INFO

# Windows service name and description.

wrapper.console.title=Apache Geronimo v2.2 Server
wrapper.ntservice.name=Geronimo
wrapper.ntservice.displayname=Apache Geronimo v2.2 Server
wrapper.ntservice.description=Apache Geronimo v2.2 Server
wrapper.ntservice.dependency.1=
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.interactive=false
</pre>
</div></div>
<p>where</p>
<ul>
	<li>replace &lt;geronimo_home&gt; and &lt;java_home&gt; with the appropriate
settings for your environment.</li>
</ul>


<p>This service wrapper allows three different methods of integration depending on,
among other things, whether you use the same class or not to start and stop the server.</p>

<p>For Geronimo we will use the simplest method of integration as the server can shutdown
cleanly when <em>System.exit()</em> is called. For this integration the wrapper's
mainclass is set to <tt><b>WrapperSimpleApp</b></tt> and the <tt><b>org.apache.geronimo.cli.daemon.DaemonCLI</b></tt>
class is specified as the main class to start the server. Right now, no extra parameters are
passed to start the server but they can be specified by adding additional <tt><b>wrapper.app.parameter</b></tt>
values. The wrapper will stop the server by calling <em>System.exit()</em>.</p>

<p>As we mentioned before, for this example we are trying to locate all the wrapper
related files within the Geronimo directory structure. As you can see in the wrapper.conf
shown above, most of the directory references are relative to Geronimo's installation directory.</p>

<p>Next we will create a batch file to run the service from the command line without
the need of actually installing the service. This is particularly helpful when testing and
debugging the configuration. Create the <tt><b>g_service.bat</b></tt>
batch file in the <b>&lt;geronimo_home&gt;/bin</b> directory and copy
the content of the following example.</p>
<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style:
solid;"><b>g_service.bat</b></div><div class="preformattedContent
panelContent">
<pre>@echo off
setlocal

rem Copyright (c) 1999, 2006 Tanuki Software Inc.
rem
rem Java Service Wrapper general startup script
rem

rem
rem Resolve the real path of the wrapper.exe
rem  For non NT systems, the _REALPATH and _WRAPPER_CONF values
rem  can be hard-coded below and the following test removed.
rem
if "%OS%"=="Windows_NT" goto nt
echo This script only works with NT-based versions of Windows.
goto :eof

:nt
rem
rem Find the application home.
rem
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0

rem Decide on the wrapper binary.
set _WRAPPER_BASE=wrapper
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
if exist "%_WRAPPER_EXE%" goto conf
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
if exist "%_WRAPPER_EXE%" goto conf
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
if exist "%_WRAPPER_EXE%" goto conf
echo Unable to locate a Wrapper executable using any of the following names:
echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
echo %_REALPATH%%_WRAPPER_BASE%.exe
pause
goto :eof

rem
rem Find the wrapper.conf
rem
:conf
set _WRAPPER_CONF="%~f1"
if not %_WRAPPER_CONF%=="" goto startup
set _WRAPPER_CONF="%_REALPATH%..\var\config\wrapper.conf"

rem
rem Start the Wrapper
rem
:startup
"%_WRAPPER_EXE%" -c %_WRAPPER_CONF%
if not errorlevel 1 goto :eof
pause
</pre>
</div></div>
<p>This file is a modified version from the one provided by the wrapper as a sample,
it has been edited to specify the location of the <tt><b>wrapper.conf</b></tt>
file relative to Geronimo's <b>var/config</b> directory.</p>

<p>You can now run Geronimo as a service from a command line, simply run the following
command:</p>

<p> <tt><b>&lt;geronimo_home&gt;/bin/g_service.bat</b></tt></p>

<p>You should see a screen similar to the following example, note that part has been
truncated for display purposes.<br/>
<font color="white"><div class="preformatted panel" style="border-style: solid;border-width:
1px;"><div class="preformattedContent panelContent">
<pre>{D:\geronimo-tomcat6-javaee5-2.2\bin&gt;g_service.bat
wrapper  | --&gt; Wrapper Started as Console
wrapper  | Launching a JVM...
jvm 1    | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1    |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
jvm 1    |
jvm 1    | Booting Geronimo Kernel (in Java 1.5.0_06)...
jvm 1    | Starting Geronimo Application Server v2.2
jvm 1    |
jvm 1    | [*                                ]  0%   0s Loading
jvm 1    | [*-                               ]  0%   0s  Loading org.apache.ge...
jvm 1    | [*&gt;                               ]  6%   0s  Loading org.apache.ge...

...

jvm 1    | [*********************************] 100%  19s Startup complete
jvm 1    |   Listening on Ports:
jvm 1    |     1050 127.0.0.1 CORBA Naming Service
jvm 1    |     1099 0.0.0.0   RMI Naming
jvm 1    |     1527 0.0.0.0   Derby Connector
jvm 1    |     2001 127.0.0.1 OpenEJB ORB Adapter
jvm 1    |     4201 0.0.0.0   org.apache.geronimo.openejb.EjbDaemonGBean
jvm 1    |     4242 0.0.0.0   Remote Login Listener
jvm 1    |     6882 127.0.0.1 OpenEJB ORB Adapter
jvm 1    |     8009 0.0.0.0   Tomcat Connector AJP
jvm 1    |     8080 0.0.0.0   Tomcat Connector HTTP
jvm 1    |     8443 0.0.0.0   Tomcat Connector HTTPS
jvm 1    |     9999 0.0.0.0   JMX Remoting Connector
jvm 1    |    61613 0.0.0.0   ActiveMQ Transport Connector
jvm 1    |    61616 0.0.0.0   ActiveMQ Transport Connector
jvm 1    |
jvm 1    |   Started Application Modules:
jvm 1    |     EAR: org.apache.geronimo.configs/webconsole-tomcat/2.2/car
jvm 1    |     RAR: org.apache.geronimo.configs/activemq-ra/2.2/car
jvm 1    |     RAR: org.apache.geronimo.configs/system-database/2.2/car
jvm 1    |     WAR: org.apache.geronimo.configs/dojo-tomcat/2.2/car
jvm 1    |     WAR: org.apache.geronimo.configs/remote-deploy-tomcat/2.2/car
jvm 1    |     WAR: org.apache.geronimo.configs/welcome-tomcat/2.2/car
jvm 1    |
jvm 1    |   Web Applications:
jvm 1    |     http://localhost:8080/
jvm 1    |     http://localhost:8080/console
jvm 1    |     http://localhost:8080/console-standard
jvm 1    |     http://localhost:8080/dojo
jvm 1    |     http://localhost:8080/remote-deploy
jvm 1    |
jvm 1    | Geronimo Application Server started
</pre>
</div></div></font></p>

<p>Congratulations&#33;&#33;&#33; you have now Geronimo server running as
a Windows service.</p>

<p>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.</p>

<h2><a name="RunningGeronimoasaWindowsService-Installing%2FRemovingtheservice"></a>Installing/Removing
the service</h2>

<p>The following two batch files are provided to install and remove Geronimo as a Windows
service. Create the files in the <tt><b>&lt;geronimo_home&gt;/bin</b></tt>
directory and copy the content as depicted in the following examples.</p>
<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style:
solid;"><b>Install_Geronimo_NT.bat</b></div><div class="preformattedContent
panelContent">
<pre>@echo off
setlocal

rem Copyright (c) 1999, 2006 Tanuki Software Inc.
rem
rem Java Service Wrapper general NT service install script
rem

if "%OS%"=="Windows_NT" goto nt
echo This script only works with NT-based versions of Windows.
goto :eof

:nt
rem
rem Find the application home.
rem
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0

rem Decide on the wrapper binary.
set _WRAPPER_BASE=wrapper
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
if exist "%_WRAPPER_EXE%" goto conf
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
if exist "%_WRAPPER_EXE%" goto conf
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
if exist "%_WRAPPER_EXE%" goto conf
echo Unable to locate a Wrapper executable using any of the following names:
echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
echo %_REALPATH%%_WRAPPER_BASE%.exe
pause
goto :eof

rem
rem Find the wrapper.conf
rem
:conf
set _WRAPPER_CONF="%~f1"
if not %_WRAPPER_CONF%=="" goto startup
set _WRAPPER_CONF="%_REALPATH%..\var\config\wrapper.conf"

rem
rem Install the Wrapper as an NT service.
rem
:startup
"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
if not errorlevel 1 goto :eof
pause
</pre>
</div></div>
<p>To install Apache Geronimo as a MS Windows service run the following command:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/Install_Geronimo_NT.bat</b></tt></p>

<p>You should get a confirmation screen similar to this example.<br/>
<font color="white"><div class="preformatted panel" style="border-style: solid;border-width:
1px;"><div class="preformattedContent panelContent">
<pre>D:\geronimo-tomcat6-javaee5-2.2\bin&gt;Install_Geronimo_NT.bat
wrapper  | Apache Geronimo v2.2 Server installed.
</pre>
</div></div></font>
<br class="atl-forced-newline" /></p>
<div class="preformatted panel" style="border-style: solid;border-width: 1px;"><div
class="preformattedHeader panelHeader" style="border-bottom-width: 1px;border-bottom-style:
solid;"><b>Uninstall_Geronimo_NT.bat</b></div><div class="preformattedContent
panelContent">
<pre>@echo off
setlocal

rem Copyright (c) 1999, 2006 Tanuki Software Inc.
rem
rem Java Service Wrapper general NT service uninstall script
rem

if "%OS%"=="Windows_NT" goto nt
echo This script only works with NT-based versions of Windows.
goto :eof

:nt
rem
rem Find the application home.
rem
rem %~dp0 is location of current script under NT
set _REALPATH=%~dp0

rem Decide on the wrapper binary.
set _WRAPPER_BASE=wrapper
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
if exist "%_WRAPPER_EXE%" goto conf
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
if exist "%_WRAPPER_EXE%" goto conf
set _WRAPPER_EXE=%_REALPATH%%_WRAPPER_BASE%.exe
if exist "%_WRAPPER_EXE%" goto conf
echo Unable to locate a Wrapper executable using any of the following names:
echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-32.exe
echo %_REALPATH%%_WRAPPER_BASE%-windows-x86-64.exe
echo %_REALPATH%%_WRAPPER_BASE%.exe
pause
goto :eof

rem
rem Find the wrapper.conf
rem
:conf
set _WRAPPER_CONF="%~f1"
if not %_WRAPPER_CONF%=="" goto startup
set _WRAPPER_CONF="%_REALPATH%..\var\config\wrapper.conf"

rem
rem Uninstall the Wrapper as an NT service.
rem
:startup
"%_WRAPPER_EXE%" -r %_WRAPPER_CONF%
if not errorlevel 1 goto :eof
pause
</pre>
</div></div>
<p>To remove the Apache Geronimo service run the following command:</p>

<p><tt><b>&lt;geronimo_home&gt;/bin/Uninstall_Geronimo_NT.bat</b></tt></p>

<p>You should get a confirmation screen similar to this example.<br/>
<font color="white"><div class="preformatted panel" style="border-style: solid;border-width:
1px;"><div class="preformattedContent panelContent">
<pre>D:\geronimo-tomcat6-javaee5-2.2\bin&gt;Uninstall_Geronimo_NT.bat
wrapper  | Apache Geronimo v2.2 Server removed.
</pre>
</div></div></font></p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Running+Geronimo+as+a+Windows+Service">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=93434&revisedVersion=28&originalVersion=27">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Running+Geronimo+as+a+Windows+Service?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message