You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2019/05/28 09:46:55 UTC
svn commit: r1860225 [15/16] - in /tomee/deps/branches/commons-daemon: ./
src/ src/assembly/ src/changes/ src/docs/ src/main/ src/main/java/
src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/commons/ src/main/java/org/apache/commons...
Added: tomee/deps/branches/commons-daemon/src/samples/build.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/samples/build.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/samples/build.xml (added)
+++ tomee/deps/branches/commons-daemon/src/samples/build.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,133 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project name="daemons samples" default="jars" basedir=".">
+
+<!-- ========== Initialize Properties ===================================== -->
+ <property file="build.properties"/>
+ <property name="dist.home" value="../../dist"/>
+ <property name="build.home" value="./build"/>
+ <property name="source.home" value="."/>
+
+ <target name="jars" depends="SimpleDaemon,SimpleApplication,ServiceDaemon,AloneService,ProcrunService"/>
+
+ <target name="clean" description="Remove output files">
+ <delete quiet="true">
+ <fileset dir="${build.home}"/>
+ <fileset dir="${dist.home}" includes="SimpleDaemon.jar service.jar aloneservice.jar ProcrunService.jar"/>
+ </delete>
+ </target>
+
+ <target name="SimpleDaemon" depends="compile"
+ description="Create SimpleDaemon.jar">
+ <mkdir dir="${dist.home}"/>
+ <jar jarfile="${dist.home}/SimpleDaemon.jar">
+ <metainf dir="../..">
+ <include name="NOTICE.txt"/>
+ <include name="LICENSE.txt"/>
+ </metainf>
+ <fileset dir="${build.home}/classes">
+ <include name="SimpleDaemon*.class" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="SimpleApplication" depends="compile"
+ description="Create SimpleApplication.jar">
+ <mkdir dir="${dist.home}"/>
+ <jar jarfile="${dist.home}/SimpleApplication.jar">
+ <metainf dir="../..">
+ <include name="NOTICE.txt"/>
+ <include name="LICENSE.txt"/>
+ </metainf>
+ <fileset dir="${build.home}/classes">
+ <include name="SimpleApplication*.class" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="ServiceDaemon" depends="compile"
+ description="Create ServiceDaemon.jar">
+ <mkdir dir="${dist.home}"/>
+ <jar jarfile="${dist.home}/service.jar">
+ <metainf dir="../..">
+ <include name="NOTICE.txt"/>
+ <include name="LICENSE.txt"/>
+ </metainf>
+ <fileset dir="${build.home}/classes">
+ <include name="ServiceDaemon*.class" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="AloneService" depends="compile"
+ description="Create aloneservice.jar">
+ <mkdir dir="${dist.home}"/>
+ <jar jarfile="${dist.home}/aloneservice.jar">
+ <metainf dir="../..">
+ <include name="NOTICE.txt"/>
+ <include name="LICENSE.txt"/>
+ </metainf>
+ <fileset dir="${build.home}/classes">
+ <include name="AloneService*.class" />
+ <include name="ServiceDaemonReadThread*.class" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="ProcrunService" depends="compile"
+ description="Create ProcrunService.jar">
+ <mkdir dir="${dist.home}"/>
+ <jar jarfile="${dist.home}/ProcrunService.jar">
+ <metainf dir="../..">
+ <include name="NOTICE.txt"/>
+ <include name="LICENSE.txt"/>
+ </metainf>
+ <manifest>
+ <attribute name="Main-Class" value="ProcrunService"/>
+ </manifest>
+ <fileset dir="${build.home}/classes">
+ <include name="ProcrunService.class" />
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="compile" depends="prepare"
+ description="Create class files">
+ <javac srcdir="${source.home}"
+ source="1.3"
+ target="1.3"
+ destdir="${build.home}/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>
+
+ <target name="prepare">
+ <mkdir dir="${build.home}"/>
+ <mkdir dir="${build.home}/classes"/>
+ </target>
+
+ <!-- Construct compile classpath -->
+ <path id="compile.classpath">
+ <!-- output jar filename may vary between releases -->
+ <fileset dir="../../dist" includes="commons-daemon-*.jar"/>
+ </path>
+
+</project>
Added: tomee/deps/branches/commons-daemon/src/site/resources/download_daemon.cgi
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/resources/download_daemon.cgi?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/resources/download_daemon.cgi (added)
+++ tomee/deps/branches/commons-daemon/src/site/resources/download_daemon.cgi Tue May 28 09:46:53 2019
@@ -0,0 +1,4 @@
+#!/bin/sh
+# Just call the standard mirrors.cgi script. It will use download.html
+# as the input template.
+exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $*
\ No newline at end of file
Propchange: tomee/deps/branches/commons-daemon/src/site/resources/download_daemon.cgi
------------------------------------------------------------------------------
svn:executable = *
Added: tomee/deps/branches/commons-daemon/src/site/resources/images/logo.gif
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/resources/images/logo.gif?rev=1860225&view=auto
==============================================================================
Binary file - no diff available.
Propchange: tomee/deps/branches/commons-daemon/src/site/resources/images/logo.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: tomee/deps/branches/commons-daemon/src/site/resources/images/logo.png
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/resources/images/logo.png?rev=1860225&view=auto
==============================================================================
Binary file - no diff available.
Propchange: tomee/deps/branches/commons-daemon/src/site/resources/images/logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: tomee/deps/branches/commons-daemon/src/site/site.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/site.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/site.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/site.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project name="Daemon">
+ <bannerRight>
+ <name>Apache Commons Daemon</name>
+ <src>/images/logo.png</src>
+ <href>/index.html</href>
+ </bannerRight>
+
+ <body>
+ <menu name="Daemon">
+ <item name="Overview" href="/index.html"/>
+ <item name="Download" href="/download_daemon.cgi"/>
+ <item name="Procrun" href="/procrun.html"/>
+ <item name="Jsvc" href="/jsvc.html"/>
+ <item name="Native binaries" href="/binaries.html"/>
+ <item name="Javadoc (latest release)" href="apidocs/index.html"/>
+ <item name="FAQ" href="/faq.html"/>
+ <item name="Wiki" href="http://wiki.apache.org/commons/Daemon"/>
+ </menu>
+
+ <menu name="Development">
+ <item name="Mailing Lists" href="/mail-lists.html"/>
+ <item name="Issue Tracking" href="/issue-tracking.html"/>
+ <item name="Source Repository" href="/source-repository.html"/>
+ </menu>
+
+ </body>
+
+</project>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/binaries.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/binaries.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/binaries.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/binaries.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+
+ <properties>
+ <title>Daemon : binaries</title>
+ <author email="jfrederic.clere@fujitsu-siemens.con">Jean-Frederic Clere</author>
+ </properties>
+
+<body>
+<section name="What to download?">
+<p>
+In the directory
+<a href="http://www.apache.org/dist/commons/daemon/binaries/">binaries</a>
+you will find subdirectories containing archives
+corresponding to your operating system. Only the Windows builds are provided as a zip file.
+</p>
+</section>
+
+<section name="How do I get the executable?">
+<subsection name="procrun">
+<p>
+The Windows archive (e.g. commons-daemon-1.1.1-bin-windows.zip) contains 2 different executables:
+<ul>
+<li>prunsrv.exe - service application for running applications as services.</li>
+<li>prunmgr.exe - the GUI manager application used to monitor and configure installed services.</li>
+</ul>
+There is only one <code>prunmgr.exe</code> application for all architectures.
+The <code>prunsrv.exe</code> executable is available in 3 different versions for different architectures.
+The version in the top-level directory is for 32-bit (x86) architectures.
+The lower level directories are for 64-bit systems:
+<ul>
+<li>amd64 - AMD/EMT 64-bit</li>
+<li>ia64 - Intel Itanium 64-bit</li>
+</ul>
+The Windows application <code>prunsrv.exe</code> is used to install an application as a service.
+Once installed, <code>prunmgr.exe</code> can be used to monitor and reconfigure the service.
+(see <a href="procrun.html">procrun</a> for more information).
+The Windows binary zip archive should be unpacked into the location from which you wish to run it, for example:
+<code>%ProgramFiles%\Apache Commons Daemon</code>
+</p>
+</subsection>
+</section>
+
+</body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/download_daemon.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/download_daemon.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/download_daemon.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/download_daemon.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: download-page-template.xml |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ | |
+ | 1) Re-generate using: mvn commons-build:download-page |
+ | |
+ | 2) Set the following properties in the component's pom: |
+ | - commons.componentid (required, alphabetic, lower case) |
+ | - commons.release.version (required) |
+ | - commons.release.name (required) |
+ | - commons.binary.suffix (optional) |
+ | (defaults to "-bin", set to "" for pre-maven2 releases) |
+ | - commons.release.desc (optional) |
+ | - commons.release.subdir (optional) |
+ | - commons.release.hash (optional, lowercase, default sha256) |
+ | |
+ | - commons.release.[234].version (conditional) |
+ | - commons.release.[234].name (conditional) |
+ | - commons.release.[234].binary.suffix (optional) |
+ | - commons.release.[234].desc (optional) |
+ | - commons.release.[234].subdir (optional) |
+ | - commons.release.[234].hash (optional, lowercase, [sha256])|
+ | |
+ | 3) Example Properties |
+ | (commons.release.name inherited by parent: |
+ | ${project.artifactId}-${commons.release.version} |
+ | |
+ | <properties> |
+ | <commons.componentid>math</commons.componentid> |
+ | <commons.release.version>1.2</commons.release.version> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Download Apache Commons Daemon</title>
+ <author email="dev@commons.apache.org">Apache Commons Documentation Team</author>
+ </properties>
+ <body>
+ <section name="Download Apache Commons Daemon">
+ <subsection name="Using a Mirror">
+ <p>
+ We recommend you use a mirror to download our release
+ builds, but you <strong>must</strong> <a href="http://www.apache.org/info/verification.html">verify the integrity</a> of
+ the downloaded files using signatures downloaded from our main
+ distribution directories. Recent releases (48 hours) may not yet
+ be available from all the mirrors.
+ </p>
+
+ <p>
+ You are currently using <b>[preferred]</b>. If you
+ encounter a problem with this mirror, please select another
+ mirror. If all mirrors are failing, there are <i>backup</i>
+ mirrors (at the end of the mirrors list) that should be
+ available.
+ <br></br>
+ [if-any logo]<a href="[link]"><img align="right" src="[logo]" border="0"></img></a>[end]
+ </p>
+
+ <form action="[location]" method="get" id="SelectMirror">
+ <p>
+ Other mirrors:
+ <select name="Preferred">
+ [if-any http]
+ [for http]<option value="[http]">[http]</option>[end]
+ [end]
+ [if-any ftp]
+ [for ftp]<option value="[ftp]">[ftp]</option>[end]
+ [end]
+ [if-any backup]
+ [for backup]<option value="[backup]">[backup] (backup)</option>[end]
+ [end]
+ </select>
+ <input type="submit" value="Change"></input>
+ </p>
+ </form>
+
+ <p>
+ It is essential that you
+ <a href="https://www.apache.org/info/verification.html">verify the integrity</a>
+ of downloaded files, preferably using the <code>PGP</code> signature (<code>*.asc</code> files);
+ failing that using the <code>SHA256</code> hash (<code>*.sha256</code> checksum files).
+ </p>
+ <p>
+ The <a href="https://www.apache.org/dist/commons/KEYS">KEYS</a>
+ file contains the public PGP keys used by Apache Commons developers
+ to sign releases.
+ </p>
+ </subsection>
+ </section>
+ <section name="Apache Commons Daemon 1.1.0">
+ <subsection name="Binaries">
+ <table>
+ <tr>
+ <td><a href="[preferred]/commons/daemon/binaries/commons-daemon-1.1.0-bin.tar.gz">commons-daemon-1.1.0-bin.tar.gz</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.1.0-bin.tar.gz.sha256">sha256</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.1.0-bin.tar.gz.asc">pgp</a></td>
+ </tr>
+ <tr>
+ <td><a href="[preferred]/commons/daemon/binaries/commons-daemon-1.1.0-bin.zip">commons-daemon-1.1.0-bin.zip</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.1.0-bin.zip.sha256">sha256</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.1.0-bin.zip.asc">pgp</a></td>
+ </tr>
+ </table>
+ </subsection>
+ <subsection name="Source">
+ <table>
+ <tr>
+ <td><a href="[preferred]/commons/daemon/source/commons-daemon-1.1.0-src.tar.gz">commons-daemon-1.1.0-src.tar.gz</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/source/commons-daemon-1.1.0-src.tar.gz.sha256">sha256</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/source/commons-daemon-1.1.0-src.tar.gz.asc">pgp</a></td>
+ </tr>
+ <tr>
+ <td><a href="[preferred]/commons/daemon/source/commons-daemon-1.1.0-src.zip">commons-daemon-1.1.0-src.zip</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/source/commons-daemon-1.1.0-src.zip.sha256">sha256</a></td>
+ <td><a href="https://www.apache.org/dist/commons/daemon/source/commons-daemon-1.1.0-src.zip.asc">pgp</a></td>
+ </tr>
+ </table>
+ </subsection>
+ </section>
+ <section name="Archives">
+ <p>
+ Older releases can be obtained from the archives.
+ </p>
+ <ul>
+ <li class="download"><a href="[preferred]/commons/daemon/">browse download area</a></li>
+ <li><a href="https://archive.apache.org/dist/commons/daemon/">archives...</a></li>
+ </ul>
+ </section>
+ </body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/faq.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/faq.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/faq.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/faq.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,100 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+
+ <properties>
+ <title>Daemon : FAQ</title>
+ <author email="jfrederic.clere@fujitsu-siemens.con">Jean-Frederic Clere</author>
+ </properties>
+
+<body>
+<section name="Buildconf problems">
+<p>
+<source>
+$ sh support/buildconf.sh
+autoconf: Undefined macros:
+***BUG in Autoconf--please report*** AC_PATH
+***BUG in Autoconf--please report*** AC_PATH
+***BUG in Autoconf--please report*** AC_PATH
+</source>
+Your version of autoconf is to old, upgrade your autoconf and retry.
+Or run support/buildconf.sh in another machine and copy the daemon tree in
+the machine where you want to compile jsvc.
+</p>
+</section>
+
+<section name="Configure problems">
+<p>
+<source>
+configure: creating ./config.status
+config.status: creating Makefile
+mv: Makefile: set owner/group (was: 1670/0): Operation not permitted
+config.status: creating Makedefs
+mv: Makedefs: set owner/group (was: 1670/0): Operation not permitted
+config.status: creating native/Makefile
+mv: native/Makefile: set owner/group (was: 1670/0): Operation not permitted
+*** All done ***
+Now you can issue "make"
+</source>
+You should ignore those error messages they are normal in FreeBSD.
+config.status creates files in /tmp and move them in the current directory.
+When FreeBSD creates files it sets the group of the files to
+the group of the directory where the files are created.
+So if /tmp is group "wheel" the files are "wheel". When moving the files in
+the current directory (if you are not member of group "wheel")
+the group "wheel" cannot be set on the moved files.
+</p>
+</section>
+<section name="Runtime problems">
+<p>
+On Linux 2.6.x jsvc does not start and write the following error:
+<source>
+jsvc.exec error: syscall failed in set_caps
+jsvc.exec error: Service exit with a return value of 4
+</source>
+CONFIG_SECURITY_CAPABILITIES in missing in your kernel try the following in the kernel sources:
+<ul>
+<li>
+Configure the kernel with "Default Linux Capabilities" and reboot
+ (by make gconfig or make xconfig under "security options" and "Enable different security models")
+</li>
+<li>
+Insert the module "capability":
+<source>
+modprobe capability
+</source>
+</li>
+</ul>
+</p>
+</section>
+
+<section name="Cygwin configuration problems">
+<p>
+The configure of jsvc does not like spaces in directory name.
+To configure with java installed in directory whose name contains a space,
+use the 8 characters name of the directory.
+For example for java in installed in <code>c:\Archivos de programa\java\jdk1.5.0_06</code>:
+<source>
+./configure --with-java=/cygdrive/c/Archiv~1/java/jdk1.5.0_06
+</source>
+</p>
+</section>
+
+</body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/index.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/index.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/index.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,115 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+
+ <properties>
+ <title>Daemon : Java based daemons or services</title>
+ <author email="jfrederic.clere@fujitsu-siemens.con">Jean-Frederic Clere</author>
+ </properties>
+
+<body>
+<section name="Introduction">
+<p>
+ Since 1994, the Java programming language evolved and became a
+ valid tool to develop reliable and performant server applications as
+ opposed to just applets and client applications. The major disadvantage of
+ the Java platform is that still today the only portable way to
+ start a Java application relies on a single point of entry: the
+ <CODE><EM CLASS="key">public static void</EM>
+ main(<EM CLASS="ref">String</EM>[])</CODE> method.
+</p>
+<p>
+ Having a single-point of entry is a valid solution for client
+ applications, where interactively a user can command to the application
+ to quit (which can terminate the Virtual Machine process at calling the
+ <CODE><EM CLASS="ref">System</EM>.exit(<EM CLASS="key">int</EM>)</CODE>
+ method), but in those cases where the application is not interactive
+ (server applications) there is currently no portable way to notify
+ the Virtual Machine of its imminent shutdown.
+</p>
+<p>
+ A server application written in Java might have to perform several tasks
+ before being able to shutdown the Virtual Machine process. For example
+ in the case of a Servlet container, before the VM process is shut down,
+ sessions might need to be serialized to disk, and web applications need
+ to be destroyed.
+</p>
+<p>
+ One common solution to this problem is to create (for example) a
+ <CODE><EM CLASS="ref">ServerSocket</EM></CODE> and wait for a particular
+ message to be issued. When the message is received, all operations
+ required to shut down the server applications are performed and at the
+ end the <CODE><EM CLASS="ref">System</EM>.exit</CODE> method is called
+ to terminate the Virtual Machine process. This method however, has
+ several disadvantages and risks:
+ <ul>
+ <li>
+ In case of a system-wide shutdown, the Virtual Machine process may be
+ shut down directly by the operating system without notifying the running
+ server application.
+ </li>
+ <li>
+ If an attacker finds out the shutdown message to send to the server
+ and discovers a way to send this message, he can easily interrupt
+ the server's operation, bypassing all the security restrictions
+ implemented in the operating system.
+ </li>
+ </ul>
+</p>
+<p>
+ Most multi-user operating systems already have a way in which server
+ applications are started and stopped. Under Unix based operating systems
+ non interactive server applications are called <em>daemons</em> and are
+ controlled by the operating system with a set of specified
+ <em>signals</em>. Under Windows such programs are called <em>services</em>
+ and are controlled by appropriate calls to specific functions defined in
+ the application binary, but although the ways of dealing with the problem
+ are different, in both cases the operating system can notify a server
+ application of its imminent shutdown, and the application has the
+ ability to perform certain tasks before its process of execution is
+ destroyed.
+</p>
+</section>
+
+<section name="Structure">
+<p>
+ Daemon is made of 2 parts. One written in C that makes the interface to
+ the operating system and the other in Java that provides the
+ Daemon API.
+</p>
+</section>
+
+<section name="Platforms">
+<p>
+ Both Win32 and UNIX like platforms are supported.
+ For Win32 platforms use <a href="procrun.html">procrun</a>.
+ For UNIX like platforms use <a href="jsvc.html">jsvc</a>.
+</p>
+</section>
+<section name="Initial Source of the Package">
+
+<p>The original Java classes came from the Jakarta Tomcat 4.0 project.</p>
+
+<p>The package name for the Daemon component is
+<code>org.apache.commons.daemon</code>.
+</p>
+</section>
+
+</body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/issue-tracking.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/issue-tracking.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/issue-tracking.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/issue-tracking.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: issue-tracking-template.xml |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ | |
+ | 1) Re-generate using: mvn commons:jira-page |
+ | |
+ | 2) Set the following properties in the component's pom: |
+ | - commons.jira.id (required, alphabetic, upper case) |
+ | - commons.jira.pid (required, numeric) |
+ | |
+ | 3) Example Properties |
+ | |
+ | <properties> |
+ | <commons.jira.id>MATH</commons.jira.id> |
+ | <commons.jira.pid>12310485</commons.jira.pid> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Apache Commons Daemon Issue tracking</title>
+ <author email="dev@commons.apache.org">Commons Documentation Team</author>
+ </properties>
+ <body>
+
+ <section name="Commons Daemon Issue tracking">
+ <p>
+ Apache Commons Daemon uses <a href="http://issues.apache.org/jira/">ASF JIRA</a> for tracking issues.
+ See the <a href="http://issues.apache.org/jira/browse/DAEMON">Commons Daemon JIRA project page</a>.
+ </p>
+
+ <p>
+ To use JIRA you may need to <a href="http://issues.apache.org/jira/secure/Signup!default.jspa">create an account</a>
+ (if you have previously created/updated Commons issues using Bugzilla an account will have been automatically
+ created and you can use the <a href="http://issues.apache.org/jira/secure/ForgotPassword!default.jspa">Forgot Password</a>
+ page to get a new password).
+ </p>
+
+ <p>
+ If you would like to report a bug, or raise an enhancement request with
+ Apache Commons Daemon please do the following:
+ <ol>
+ <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=12310468&sorter/field=issuekey&sorter/order=DESC&status=1&status=3&status=4">Search existing open bugs</a>.
+ If you find your issue listed then please add a comment with your details.</li>
+ <li><a href="mail-lists.html">Search the mailing list archive(s)</a>.
+ You may find your issue or idea has already been discussed.</li>
+ <li>Decide if your issue is a bug or an enhancement.</li>
+ <li>Submit either a <a href="http://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310468&issuetype=1&priority=4&assignee=-1">bug report</a>
+ or <a href="http://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310468&issuetype=4&priority=4&assignee=-1">enhancement request</a>.</li>
+ </ol>
+ </p>
+
+ <p>
+ Please also remember these points:
+ <ul>
+ <li>the more information you provide, the better we can help you</li>
+ <li>test cases are vital, particularly for any proposed enhancements</li>
+ <li>the developers of Apache Commons Daemon are all unpaid volunteers</li>
+ </ul>
+ </p>
+
+ <p>
+ For more information on subversion and creating patches see the
+ <a href="http://www.apache.org/dev/contributors.html">Apache Contributors Guide</a>.
+ </p>
+
+ <p>
+ You may also find these links useful:
+ <ul>
+ <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=12310468&sorter/field=issuekey&sorter/order=DESC&status=1&status=3&status=4">All Open Commons Daemon bugs</a></li>
+ <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=12310468&sorter/field=issuekey&sorter/order=DESC&status=5&status=6">All Resolved Commons Daemon bugs</a></li>
+ <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&pid=12310468&sorter/field=issuekey&sorter/order=DESC">All Commons Daemon bugs</a></li>
+ </ul>
+ </p>
+ </section>
+ </body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/jsvc.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/jsvc.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/jsvc.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/jsvc.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,336 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+
+ <properties>
+ <title>Daemon : Java Service</title>
+ <author email="jfrederic.clere@fujitsu-siemens.con">Jean-Frederic Clere</author>
+ </properties>
+
+<body>
+<section name="Introduction">
+<p>
+ Jsvc is a set of libraries and applications for making Java
+ applications run on UNIX more easily.
+ <br/>
+ Jsvc allows the application (e.g. Tomcat) to perform some privileged operations as root
+ (e.g. bind to a port < 1024), and then switch identity to a non-privileged user.
+ <br/>
+ It can run on Win32 via the Cygwin emulation layer (see
+ <a href="http://www.cygwin.com/"> Cygwin</a> for more information),
+ however Win32 users may prefer to use <a href="procrun.html"> procrun</a>
+ instead, which allows the application to run as a Windows Service.
+</p>
+<p>
+ The sources are located in the src/native/unix subdirectory.
+</p>
+<p>
+ In the future <a href="http://apr.apache.org/"> APR </a> may be used
+ to provide more portable platform support.
+</p>
+</section>
+
+<section name="Building from source">
+<p>
+To build under a UNIX operating system you will need:
+<ul>
+ <li>GNU AutoConf (at least version 2.53)</li>
+ <li>An ANSI-C compliant compiler (GCC is good)</li>
+ <li>GNU Make</li>
+ <li>A Java Platform 2 compliant SDK</li>
+</ul>
+
+
+You need to build the "configure" program with:
+
+<source>
+sh support/buildconf.sh
+</source>
+
+(Note it is possible to replace sh by any compatible shell like bash, ksh).
+
+The result should be something like:
+<source>
+support/buildconf.sh
+support/buildconf.sh: configure script generated successfully
+</source>
+Once the configure script is generated, follow the next section.
+</p>
+</section>
+
+<section name="Building from a release tarball">
+<p>
+To build the binary under a UNIX operating system you will need:
+<ul>
+ <li>An ANSI-C compliant compiler (GCC is good)</li>
+ <li>GNU Make</li>
+ <li>A Java Platform 2 compliant SDK</li>
+</ul>
+
+You have to specify the <code>JAVA_HOME</code> of the SDK
+either with the <code>--with-java=<dir></code> parameter or set the <code>JAVA_HOME</code> environment
+to point to your SDK installation. For example:
+<source>
+./configure --with-java=/usr/java
+</source>
+or
+<source>
+export JAVA_HOME
+./configure
+</source>
+
+If your operating system is supported, configure will go through cleanly,
+otherwise it will report an error (please send us the details of your
+OS/JDK, or a patch against the sources). To build the binaries and
+libraries simply do:
+<source>
+make
+</source>
+This will generate the executable file <code>jsvc</code>.
+</p>
+</section>
+
+<section name="Starting jsvc">
+<p>
+To check the allowed parameters for the jsvc binary simply do:
+<source>
+./jsvc -help
+Usage: jsvc [-options] class [args...]
+
+Where options include:
+
+ -help | --help | -?
+ show this help page (implies -nodetach)
+ -jvm <JVM name>
+ use a specific Java Virtual Machine. Available JVMs:
+ 'client' 'server'
+ -client
+ use a client Java Virtual Machine.
+ -server
+ use a server Java Virtual Machine.
+ -cp / -classpath <directories and zip/jar files>
+ set search path for service classes and resouces
+ -home <directory>
+ set the path of your JDK or JRE installation (or set
+ the JAVA_HOME environment variable)
+ -version
+ show the current Java environment version (to check
+ correctness of -home and -jvm. Implies -nodetach)
+ -showversion
+ show the current Java environment version (to check
+ correctness of -home and -jvm) and continue execution.
+ -nodetach
+ don't detach from parent process and become a daemon
+ -debug
+ verbosely print debugging information
+ -check
+ only check service (implies -nodetach)
+ -user <user>
+ user used to run the daemon (defaults to current user)
+ -verbose[:class|gc|jni]
+ enable verbose output
+ -cwd </full/path>
+ set working directory to given location (defaults to /)
+ -outfile </full/path/to/file>
+ Location for output from stdout (defaults to /dev/null)
+ Use the value '&2' to simulate '1>&2'
+ -errfile </full/path/to/file>
+ Location for output from stderr (defaults to /dev/null)
+ Use the value '&1' to simulate '2>&1'
+ -pidfile </full/path/to/file>
+ Location for output from the file containing the pid of jsvc
+ (defaults to /var/run/jsvc.pid)
+ -D<name>=<value>
+ set a Java system property
+ -X<option>
+ set Virtual Machine specific option
+ -ea[:<packagename>...|:<classname>]
+ -enableassertions[:<packagename>...|:<classname>]
+ enable assertions
+ -da[:<packagename>...|:<classname>]
+ -disableassertions[:<packagename>...|:<classname>]
+ disable assertions
+ -esa | -enablesystemassertions
+ enable system assertions
+ -dsa | -disablesystemassertions
+ disable system assertions
+ -agentlib:<libname>[=<options>]
+ load native agent library <libname>, e.g. -agentlib:hprof
+ -agentpath:<pathname>[=<options>]
+ load native agent library by full pathname
+ -javaagent:<jarpath>[=<options>]
+ load Java programming language agent, see java.lang.instrument
+ -procname <procname>
+ use the specified process name (works only for Linux)
+ -wait <waittime>
+ wait waittime seconds for the service to start
+ waittime should multiple of 10 (min=10)
+ -restarts <maxrestarts>
+ maximum automatic restarts (integer)
+ -1=infinite (default), 0=none, 1..(INT_MAX-1)=fixed restart count
+ -stop
+ stop the service using the file given in the -pidfile option
+ -keepstdin
+ does not redirect stdin to /dev/null
+ --add-modules=<module name>
+ Java 9 --add-modules option. Passed as it is to JVM
+ --module-path=<module path>
+ Java 9 --module-path option. Passed as it is to JVM
+ --upgrade-module-path=<module path>
+ Java 9 --upgrade-module-path option. Passed as it is to JVM
+ --add-reads=<module name>
+ Java 9 --add-reads option. Passed as it is to JVM
+ --add-exports=<module name>
+ Java 9 --add-exports option. Passed as it is to JVM
+ --add-opens=<module name>
+ Java 9 --add-opens option. Passed as it is to JVM
+ --limit-modules=<module name>
+ Java 9 --limit-modules option. Passed as it is to JVM
+ --patch-module=<module name>
+ Java 9 --patch-module option. Passed as it is to JVM
+ --illegal-access=<value>
+ Java 9 --illegal-access option. Passed as it is to JVM. Refer java help for possible values.
+</source>
+</p>
+<subsection name="Mac OS X universal binaries">
+<p>
+If jsvc was build with universal binary support the proper way of
+starting <code>jsvc</code> is by using Mac OS X <code>arch</code> command:
+</p>
+<source>
+ arch -arch i386 ./jsvc -jvm server <original jsvc parameters>
+
+ for running 64-bit JVM use the:
+ arch -arch x86_64 ./jsvc -jvm server <original jsvc parameters>
+
+</source>
+<p>
+Use <code>-jvm server</code> because default <code>client</code> JVM is
+not present for all architectures.
+</p>
+</subsection>
+</section>
+<section name="Using jsvc">
+<p>
+There two ways to use jsvc: via a Class that implements the Daemon interface or
+via calling a Class that has the required methods.
+For example Tomcat-4.1.x uses the Daemon interface
+whereas Tomcat-5.0.x provides a Class whose methods are called by jsvc directly.
+</p>
+<subsection name="Via Daemon interface">
+<p>
+Do the following:
+<ul>
+ <li>Write a Class that implements the Daemon interface (MyClass).</li>
+ <li>Put it in a jarfile (my.jar).</li>
+ <li>Call jsvc like:
+ <source>
+./jsvc -cp commons-daemon.jar:my.jar MyClass
+ </source>
+ </li>
+</ul>
+</p>
+</subsection>
+<subsection name="Directly">
+<p>
+Write a Class (MyClass) that implements the following methods:
+<ul>
+ <li>void init(String[] arguments): Here open configuration files, create a trace file, create
+ ServerSockets, Threads</li>
+ <li>void start(): Start the Thread, accept incoming connections</li>
+ <li>void stop(): Inform the Thread to terminate the run(), close the ServerSockets</li>
+ <li><code>void destroy()</code>: Destroy any object created in init()</li>
+</ul>
+Store it in a jarfile and use as above:
+<source>
+./jsvc -cp my.jar MyClass
+</source>
+</p>
+</subsection>
+</section>
+<section name="How jsvc works">
+<p>
+Jsvc uses 3 processes: a launcher process, a controller process and a controlled process.
+The controlled process is also the main java thread, if the JVM crashes
+the controller will restart it in the next minute.
+Jsvc is a daemon process so it should be started as root and the <code>-user</code> parameter
+allows to downgrade to an unprivilegded user.
+When the <code>-wait</code> parameter is used, the launcher process waits until the controller says
+"I am ready", otherwise it returns after creating the controller process.
+</p>
+
+<subsection name="Forks in commons-daemon">
+<p>
+Launcher process:
+<source>
+main()
+{
+ fork()
+ parent: wait_child(), wait until JAVA service started when the child says "I am ready".
+ child: controller process.
+}
+</source>
+
+Controller process:
+<source>
+ while (fork()) {
+ parent: wait_for_child.
+ if exited and restart needed continue
+ else exit.
+ child: exit(child()). controlled process.
+ }
+</source>
+
+Controlled process:
+<source>
+In child(): controlled process.
+ init_JVM().
+ load_service().
+ start_service().
+ say "I am ready"
+ wait for signal or poll for stop
+ stop_service().
+ destroy_service().
+ destroy_JVM().
+ exit (with different codes so that parent knows if it has to restart us).
+</source>
+Note: The controller process uses signals to stop the controlled process.
+</p>
+</subsection>
+
+<subsection name="Downgrading user">
+<p>
+On Linux <code>setuid()</code>/<code>setgid()</code> + capabilities are used. On other unix <code>setgid</code>/<code>initgroups</code> are used.
+
+We have something like:
+<source>
+/* as root */
+init_JVM().
+load_service. /* java_load() calls the load method */
+downgrade user (set_caps() or set_user_group())
+/* as the user $USER (from -user $USER parameter) */
+umask()
+start_service. /* java_start() calls the start method */
+</source>
+</p>
+</subsection>
+</section>
+
+</body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/mail-lists.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/mail-lists.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/mail-lists.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/mail-lists.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,202 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+ +======================================================================+
+ |**** ****|
+ |**** THIS FILE IS GENERATED BY THE COMMONS BUILD PLUGIN ****|
+ |**** DO NOT EDIT DIRECTLY ****|
+ |**** ****|
+ +======================================================================+
+ | TEMPLATE FILE: mail-lists-template.xml |
+ | commons-build-plugin/trunk/src/main/resources/commons-xdoc-templates |
+ +======================================================================+
+ | |
+ | 1) Re-generate using: mvn commons:mail-page |
+ | |
+ | 2) Set the following properties in the component's pom: |
+ | - commons.componentid (required, alphabetic, lower case) |
+ | |
+ | 3) Example Properties |
+ | |
+ | <properties> |
+ | <commons.componentid>math</commons.componentid> |
+ | </properties> |
+ | |
+ +======================================================================+
+-->
+<document>
+ <properties>
+ <title>Apache Commons Daemon Mailing Lists</title>
+ <author email="dev@commons.apache.org">Commons Documentation Team</author>
+ </properties>
+ <body>
+
+ <section name="Overview">
+ <p>
+ <a href="index.html">Commons Daemon</a> shares mailing lists with all the other
+ <a href="http://commons.apache.org/components.html">Commons Components</a>.
+ To make it easier for people to only read messages related to components they are interested in,
+ the convention in Commons is to prefix the subject line of messages with the component's name,
+ for example:
+ <ul>
+ <li>[daemon] Problem with the ...</li>
+ </ul>
+ </p>
+ <p>
+ Questions related to the usage of Commons Daemon should be posted to the
+ <a href="http://mail-archives.apache.org/mod_mbox/commons-user/">User List</a>.
+ <br />
+ The <a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">Developer List</a>
+ is for questions and discussion related to the development of Commons Daemon.
+ <br />
+ Please do not cross-post; developers are also subscribed to the user list.
+ </p>
+ <p>
+ <strong>Note:</strong> please don't send patches or attachments to any of the mailing lists.
+ Patches are best handled via the <a href="issue-tracking.html">Issue Tracking</a> system.
+ Otherwise, please upload the file to a public server and include the URL in the mail.
+ </p>
+ </section>
+
+ <section name="Commons Daemon Mailing Lists">
+ <p>
+ <strong>Please prefix the subject line of any messages for <a href="index.html">Commons Daemon</a>
+ with <i>[daemon]</i></strong> - <i>thanks!</i>
+ <br />
+ <br />
+ </p>
+
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Subscribe</th>
+ <th>Unsubscribe</th>
+ <th>Post</th>
+ <th>Archive</th>
+ <th>Other Archives</th>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons User List</strong>
+ <br /><br />
+ Questions on using Commons Daemon.
+ <br /><br />
+ </td>
+ <td><a href="mailto:user-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:user-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><a href="mailto:user@commons.apache.org?subject=[daemon]">Post</a></td>
+ <td><a href="http://mail-archives.apache.org/mod_mbox/commons-user/">mail-archives.apache.org</a></td>
+ <td><a href="http://markmail.org/list/org.apache.commons.users/">markmail.org</a><br />
+ <a href="http://www.mail-archive.com/user@commons.apache.org/">www.mail-archive.com</a><br />
+ <a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons Developer List</strong>
+ <br /><br />
+ Discussion of development of Commons Daemon.
+ <br /><br />
+ </td>
+ <td><a href="mailto:dev-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:dev-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><a href="mailto:dev@commons.apache.org?subject=[daemon]">Post</a></td>
+ <td><a href="http://mail-archives.apache.org/mod_mbox/commons-dev/">mail-archives.apache.org</a></td>
+ <td><a href="http://markmail.org/list/org.apache.commons.dev/">markmail.org</a><br />
+ <a href="http://www.mail-archive.com/dev@commons.apache.org/">www.mail-archive.com</a><br />
+ <a href="http://news.gmane.org/gmane.comp.jakarta.commons.devel">news.gmane.org</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons Issues List</strong>
+ <br /><br />
+ Only for e-mails automatically generated by the <a href="issue-tracking.html">issue tracking</a> system.
+ <br /><br />
+ </td>
+ <td><a href="mailto:issues-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:issues-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><i>read only</i></td>
+ <td><a href="http://mail-archives.apache.org/mod_mbox/commons-issues/">mail-archives.apache.org</a></td>
+ <td><a href="http://markmail.org/list/org.apache.commons.issues/">markmail.org</a><br />
+ <a href="http://www.mail-archive.com/issues@commons.apache.org/">www.mail-archive.com</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+ <strong>Commons Commits List</strong>
+ <br /><br />
+ Only for e-mails automatically generated by the <a href="source-repository.html">source control</a> sytem.
+ <br /><br />
+ </td>
+ <td><a href="mailto:commits-subscribe@commons.apache.org">Subscribe</a></td>
+ <td><a href="mailto:commits-unsubscribe@commons.apache.org">Unsubscribe</a></td>
+ <td><i>read only</i></td>
+ <td><a href="http://mail-archives.apache.org/mod_mbox/commons-commits/">mail-archives.apache.org</a></td>
+ <td><a href="http://markmail.org/list/org.apache.commons.commits/">markmail.org</a><br />
+ <a href="http://www.mail-archive.com/commits@commons.apache.org/">www.mail-archive.com</a>
+ </td>
+ </tr>
+
+ </table>
+
+ </section>
+ <section name="Apache Mailing Lists">
+ <p>
+ Other mailing lists which you may find useful include:
+ </p>
+
+ <table>
+ <tr>
+ <th>Name</th>
+ <th>Subscribe</th>
+ <th>Unsubscribe</th>
+ <th>Post</th>
+ <th>Archive</th>
+ <th>Other Archives</th>
+ </tr>
+ <tr>
+ <td>
+ <strong>Apache Announce List</strong>
+ <br /><br />
+ General announcements of Apache project releases.
+ <br /><br />
+ </td>
+ <td><a class="externalLink" href="mailto:announce-subscribe@apache.org">Subscribe</a></td>
+ <td><a class="externalLink" href="mailto:announce-unsubscribe@apache.org">Unsubscribe</a></td>
+ <td><i>read only</i></td>
+ <td><a class="externalLink" href="http://mail-archives.apache.org/mod_mbox/www-announce/">mail-archives.apache.org</a></td>
+ <td><a class="externalLink" href="http://markmail.org/list/org.apache.announce/">markmail.org</a><br />
+ <a class="externalLink" href="http://old.nabble.com/Apache-News-and-Announce-f109.html">old.nabble.com</a><br />
+ <a class="externalLink" href="http://www.mail-archive.com/announce@apache.org/">www.mail-archive.com</a><br />
+ <a class="externalLink" href="http://news.gmane.org/gmane.comp.apache.announce">news.gmane.org</a>
+ </td>
+ </tr>
+ </table>
+
+ </section>
+ </body>
+</document>
Added: tomee/deps/branches/commons-daemon/src/site/xdoc/procrun.xml
URL: http://svn.apache.org/viewvc/tomee/deps/branches/commons-daemon/src/site/xdoc/procrun.xml?rev=1860225&view=auto
==============================================================================
--- tomee/deps/branches/commons-daemon/src/site/xdoc/procrun.xml (added)
+++ tomee/deps/branches/commons-daemon/src/site/xdoc/procrun.xml Tue May 28 09:46:53 2019
@@ -0,0 +1,700 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<document>
+ <properties>
+ <title>Daemon : Procrun</title>
+ <author email="mturk@apache.org">Mladen Turk</author>
+ </properties>
+
+<body>
+<section name="Introduction">
+<p>
+ Procrun is a set of applications that allow Windows users to wrap
+ (mostly) Java applications (e.g. Tomcat) as a Windows service.
+ <br></br>
+ The service can be set to automatically start when the machine boots
+ and will continue to run with no user logged onto the machine.
+</p>
+</section>
+
+<section name="Procrun monitor application">
+<p>
+ <b>Prunmgr</b> is a GUI application for monitoring and configuring procrun
+ services.
+</p>
+<p>
+ Each command line directive is in the form of <b>//XX[//ServiceName]</b>
+</p>
+<p>
+ If the <code>//ServiceName</code> parameter is omitted, then the service name is
+ assumed to be the name of the file.
+ <br/>
+ The Prunsrv application behaves in the same way,
+ so to allow both applications to reside in the same directory, the Prunmgr application
+ will remove a trailing <b>w</b> (lower-case w) from the name.
+ <br/>
+ For example if the Prunmgr application is renamed as <code>TestService.exe</code>
+ - or as <code>TestServicew.exe</code> -
+ then the default service name is <code>TestService</code>.
+</p>
+ <p>The available command line options are:</p>
+<p>
+ <table>
+ <tr><th>//ES</th>
+ <td>Edit service configuration</td>
+ <td>This is the default operation. It is called if the no option is
+ provided.
+ Starts the GUI application which allows the service configuration
+ to be modified, started and stopped.
+ </td>
+ </tr>
+ <tr><th>//MS</th>
+ <td>Monitor service</td>
+ <td>Starts the GUI application and minimizes it to the system tray.
+ </td>
+ </tr>
+ <tr><th>//MR</th>
+ <td>Monitor & run service</td>
+ <td>Starts the GUI application and minimizes it to the system tray.
+ Start the service if it is not currently running.
+ </td>
+ </tr>
+ <tr><th>//MQ</th>
+ <td>Monitor Quit</td>
+ <td>Stop any running monitor for the service.
+ </td>
+ </tr>
+ </table>
+</p>
+</section>
+
+<section name="Procrun service application">
+<p>
+ <b>Prunsrv</b> is a service application for running applications as services.
+ It can convert any application (not just Java applications) to run as a service.
+</p>
+
+<subsection name="Command line arguments">
+<p>
+ Each command line directive is in the form of <b>//XX[//ServiceName]</b>.
+</p>
+<p>
+ If the <code>//ServiceName</code> parameter is omitted, then the service name is
+ assumed to be the name of the file.
+ <br/>
+ For example if the application is renamed as <code>TestService.exe</code>,
+ then the default service name is <code>TestService</code>.
+</p>
+ <p>The available command line options are:</p>
+<p>
+ <table>
+ <tr><th>//TS</th>
+ <td>Run the service as a console application</td>
+ <td>This is the default operation. It is called if the no option is provided.
+ </td>
+ </tr>
+ <tr><th>//RS</th>
+ <td>Run the service</td>
+ <td>Called only from ServiceManager</td>
+ </tr>
+ <tr><th>//ES</th>
+ <td>Start (execute) the service</td>
+ <td></td>
+ </tr>
+ <tr><th>//SS</th>
+ <td>Stop the service</td>
+ <td></td>
+ </tr>
+ <tr><th>//US</th>
+ <td>Update service parameters</td>
+ <td></td>
+ </tr>
+ <tr><th>//IS</th>
+ <td>Install service</td>
+ <td></td>
+ </tr>
+ <tr><th>//DS</th>
+ <td>Delete service</td>
+ <td>Stops the service first if it is currently running</td>
+ </tr>
+ <tr><th>//PP[//seconds]</th>
+ <td>Pause</td>
+ <td>Default is 60 seconds</td>
+ </tr>
+ <tr><th>//VS</th>
+ <td>Version</td>
+ <td>Print version and exit (since version 1.0.3)</td>
+ </tr>
+ <tr><th>//?</th>
+ <td>Help</td>
+ <td>Print usage and exit (since version 1.0.3)</td>
+ </tr>
+ </table>
+</p>
+ <p>Starting with version <b>1.0.8</b> a more traditional command line can
+ be used in the form: <b>command [ServiceName]</b>.
+</p>
+<p>
+ <table>
+ <tr><th>run</th>
+ <td>Run the service as a console application</td>
+ <td>This is the default operation. It is called if the no option is provided
+ and has the same effect as calling <b>//TS</b>.
+ </td>
+ </tr>
+ <tr><th>service</th>
+ <td>Run the service</td>
+ <td>Called only from ServiceManager</td>
+ </tr>
+ <tr><th>start</th>
+ <td>Start the service</td>
+ <td>Synonym for <b>//ES</b></td>
+ </tr>
+ <tr><th>stop</th>
+ <td>Stop the service</td>
+ <td>Synonym for <b>//SS</b></td>
+ </tr>
+ <tr><th>update</th>
+ <td>Update service parameters</td>
+ <td>Synonym for <b>//US</b></td>
+ </tr>
+ <tr><th>install</th>
+ <td>Install service</td>
+ <td>Synonym for <b>//IS</b></td>
+ </tr>
+ <tr><th>delete</th>
+ <td>Delete service</td>
+ <td>Stops the service first if it is currently running</td>
+ </tr>
+ <tr><th>pause [seconds]</th>
+ <td>Pause</td>
+ <td>Default is 60 seconds</td>
+ </tr>
+ <tr><th>version</th>
+ <td>Version</td>
+ <td>Print version and exit</td>
+ </tr>
+ <tr><th>help</th>
+ <td>Help</td>
+ <td>Print usage and exit</td>
+ </tr>
+ </table>
+</p>
+</subsection>
+<subsection name="Command line parameters">
+<p>
+ Each command parameter is prefixed with <b>--</b> (or <b>++</b>, see below).
+ <br/>
+ If an environment variable exists with the same name as a command line parameter but
+ prefixed with <code>PR_</code> it will <b>override</b> the equivalent command line parameter.
+ <br/>
+ For example:
+<source>set PR_CLASSPATH=xx.jar</source>
+</p>
+<p>is equivalent to providing
+<source>--Classpath=xx.jar</source>
+</p>
+<p> as a command line parameter.</p>
+<p>
+If a parameter is repeated, then normally the last value takes precedence.
+However some parameters can take multiple values - for example StartParams and JvmOptions.
+If these parameters are prefixed with <b>++</b>, then the value will be appended to the existing value.
+For example:
+<source>
+--Startup=manual --Startup=auto --JvmOptions=-Done=1 ++JvmOptions=-Dtwo=2
+</source>
+will result in the following values being used:
+<source>
+Startup:
+auto
+
+JvmOptions:
+-Done=1
+-Dtwo=2
+</source>
+<br/>
+Only multi-valued parameters support this; they are indicated in the table below by <b><code>++</code></b>.
+<br></br>
+If <b><code>++</code></b> is used for a parameter that does not support multiple values,
+then it is treated the same as <b><code>--</code></b>. No error is reported.
+<br/>
+Configuration is overwritten in case <b><code>--</code></b> is used.
+For example:
+<source>
+--JvmOptions=-Dthree=3 ++JvmOptions=-Dfour=4
+</source>
+will always overwrite the JvmOptions. The resulting configuration will be:
+<source>
+Startup:
+auto
+
+JvmOptions:
+-Dthree=3
+-Dfour=4
+</source>
+However if on <b><code>++</code></b> is used the values will be appended. For example calling the
+following after the first example
+<source>
+++JvmOptions=-Dthree=3 ++JvmOptions=-Dfour=2
+</source>
+will result in the following values being used:
+<source>
+Startup:
+auto
+
+JvmOptions:
+-Done=1
+-Dtwo=2
+-Dthree=3
+-Dfour=4
+</source>
+<br/>
+In case you intermix the <b><code>++</code></b> and <b><code>--</code></b> options, the
+last <b><code>--</code></b> parameter will cause option reset. For example:
+<source>
+--Startup=manual --Startup=auto --JvmOptions=-Done=1 ++JvmOptions=-Dtwo=2 --JvmOptions=-Dthree=3 ++JvmOptions=-Dfour=2
+</source>
+will result in the following values being used:
+<source>
+Startup:
+auto
+
+JvmOptions:
+-Dthree=3
+-Dfour=4
+</source>
+</p>
+<p>
+When updating a service (//US or update command), using <b><code>--</code></b>
+will replace any existing parameter with the new setting.
+<br/>
+For multi-valued parameters, using the <b><code>++</code></b> option qualifier
+will add the new value(s) to any existing value(s).
+</p>
+<p>
+ <table>
+ <tr>
+ <th>Parameter Name  </th>
+ <th>Default</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>--Description</td>
+ <td></td>
+ <td>Service name description (maximum 1024 characters)</td>
+ </tr>
+ <tr>
+ <td>--DisplayName</td>
+ <td>ServiceName</td>
+ <td>Service display name</td>
+ </tr>
+ <tr>
+ <td>--Install</td>
+ <td>procrun.exe //RS//ServiceName</td>
+ <td>Install image</td>
+ </tr>
+ <tr>
+ <td>--Startup</td>
+ <td>manual</td>
+ <td>Service startup mode can be either <b>auto</b> or <b>manual</b></td>
+ </tr>
+ <tr>
+ <td>--Type</td>
+ <td></td>
+ <td>Service type can be <b>interactive</b> to allow the service to interact with the desktop.
+ Use this option only with Local system accounts.</td>
+ </tr>
+ <tr>
+ <td>++DependsOn</td>
+ <td></td>
+ <td>List of services that this service depends on. Dependent services
+ are separated using either <b>#</b> or <b>;</b> characters</td>
+ </tr>
+ <tr>
+ <td>++Environment</td>
+ <td></td>
+ <td>List of environment variables that will be provided to the service
+ in the form <b>key=value</b>. They are separated using either
+ <b>#</b> or <b>;</b> characters.
+ If you need to embed either # or ; character within a value put them inside single quotes.
+ </td>
+ </tr>
+ <tr>
+ <td>--User</td>
+ <td></td>
+ <td>User account used for running executable. It is used only for
+ StartMode <b>Java</b> or <b>exe</b> and enables running applications
+ as a service under an account without the LogonAsService privilege.</td>
+ </tr>
+ <tr>
+ <td>--Password</td>
+ <td></td>
+ <td>Password for user account set by --User parameter</td>
+ </tr>
+ <tr>
+ <td>--ServiceUser</td>
+ <td></td>
+ <td>Specifies the name of the account under which the service should run.
+ Use an account name in the form <i>DomainName\UserName</i>.
+ The service process will be logged on as this user.
+ if the account belongs to the built-in domain, you can specify <i>.\UserName</i>
+ Note that the Service Control Manager does not accept localised forms of
+ the standard names so to use them you need to specify
+ <i>NT Authority\LocalService</i>, <i>NT Authority\NetworkService</i> or
+ <i>LocalSystem</i> as appropriate.
+ </td>
+ </tr>
+ <tr>
+ <td>--ServicePassword</td>
+ <td></td>
+ <td>Password for user account set by --ServiceUser parameter</td>
+ </tr>
+ <tr>
+ <td>--LibraryPath</td>
+ <td></td>
+ <td>Directory added to the search path used to locate the DLLs for the JVM.
+ This directory is added both in front of the <b>PATH</b> environment variable
+ and as a parameter to the <b>SetDLLDirectory</b> function.
+ </td>
+ </tr>
+ <tr>
+ <td>--JavaHome</td>
+ <td>JAVA_HOME</td>
+ <td>Set a different JAVA_HOME than defined by JAVA_HOME environment
+ variable</td>
+ </tr>
+ <tr>
+ <td>--Jvm</td>
+ <td>auto</td>
+ <td>Use either <b>auto</b> (i.e. find the JVM from the Windows registry) or specify the full path to the <b>jvm.dll</b>.
+ You can use environment variable expansion here.</td>
+ </tr>
+ <tr>
+ <td>++JvmOptions</td>
+ <td>-Xrs</td>
+ <td>List of options in the form of <b>-D</b> or <b>-X</b> that will be
+ passed to the JVM. The options are separated using either
+ <b>#</b> or <b>;</b> characters. If you need to embed either # or ;
+ character put them inside single quotes. (Not used in <b>exe</b> mode.)</td>
+ </tr>
+ <tr>
+ <td>++JvmOptions9</td>
+ <td></td>
+ <td>List of options in the form of <b>-D</b> or <b>-X</b> that will be
+ passed to the JVM when running on Java 9 or later. The options are
+ separated using either <b>#</b> or <b>;</b> characters. If you need to
+ embed either # or ; character put them inside single quotes.
+ (Not used in <b>exe</b> mode.)</td>
+ </tr>
+ <tr>
+ <td>--Classpath</td>
+ <td></td>
+ <td>Set the Java classpath. (Not used in <b>exe</b> mode.)</td>
+ </tr>
+ <tr>
+ <td>--JvmMs</td>
+ <td></td>
+ <td>Initial memory pool size in MB. (Not used in <b>exe</b> mode.)</td>
+ </tr>
+ <tr>
+ <td>--JvmMx</td>
+ <td></td>
+ <td>Maximum memory pool size in MB. (Not used in <b>exe</b> mode.)</td>
+ </tr>
+ <tr>
+ <td>--JvmSs</td>
+ <td></td>
+ <td>Thread stack size in KB. (Not used in <b>exe</b> mode.)</td>
+ </tr>
+ <tr>
+ <td>--StartMode</td>
+ <td></td>
+ <td>One of <b>jvm</b>, <b>Java</b> or <b>exe</b>.
+ The modes are:
+ <ul>
+ <li>jvm - start Java in-process. Depends on jvm.dll, see <b>--Jvm</b>.</li>
+ <li>Java - same as exe, but automatically uses the default Java executable, i.e. %JAVA_HOME%\bin\java.exe.
+ Make sure JAVA_HOME is set correctly, or use --JavaHome to provide the correct location.
+ If neither is set, procrun will try to find the default JDK (not JRE) from the Windows registry.</li>
+ <li>exe - run the image as a separate process</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <tr>
+ <td>--StartImage</td>
+ <td></td>
+ <td>Executable that will be run. Only applies to <b>exe</b> mode.</td>
+ </tr>
+ <tr>
+ <td>--StartPath</td>
+ <td></td>
+ <td>Working path for the start image executable.</td>
+ </tr>
+ <tr>
+ <td>--StartClass</td>
+ <td>Main</td>
+ <td>Class that contains the startup method.
+ Applies to the <b>jvm</b> and <b>Java</b> modes. (Not used in <b>exe</b> mode.)
+ </td>
+ </tr>
+ <tr>
+ <td>--StartMethod</td>
+ <td>main</td>
+ <td>Name of method to be called when service is started.
+ It must be <code>static void</code> and have argument <code>(String args[])</code>.
+ Only applies to <b>jvm</b> mode - in <b>Java</b> mode, the <b>main</b> method is always used.
+ <br />
+ <b>Note:</b> in <code>jvm</code> mode, the start method should not return until the stop method
+ has been called.
+ </td>
+ </tr>
+ <tr>
+ <td>++StartParams</td>
+ <td></td>
+ <td>List of parameters that will be passed to either StartImage or
+ StartClass. Parameters are separated using either <b>#</b> or
+ <b>;</b> character.</td>
+ </tr>
+ <tr>
+ <td>--StopMode</td>
+ <td></td>
+ <td>One of <b>jvm</b>, <b>Java</b> or <b>exe</b>.
+ See <b>--StartMode</b> for further details.
+ </td>
+ </tr>
+ <td>--StopImage</td>
+ <td></td>
+ <td>Executable that will be run on Stop service signal. Only applies to <b>exe</b> mode.</td>
+ </tr>
+ <tr>
+ <td>--StopPath</td>
+ <td></td>
+ <td>Working path for the stop image executable. Does not apply to <b>jvm</b> mode.</td>
+ </tr>
+ <tr>
+ <td>--StopClass</td>
+ <td>Main</td>
+ <td>Class that will be used on Stop service signal.
+ Applies to the <b>jvm</b> and <b>Java</b> modes.
+ </td>
+ </tr>
+ <tr>
+ <td>--StopMethod</td>
+ <td>main</td>
+ <td>Name of method to be called when service is stopped.
+ It must be <code>static void</code> and have argument <code>(String args[])</code>.
+ Only applies to <b>jvm</b> mode.
+ In <b>Java</b> mode, the <b>main</b> method is always used.
+ </td>
+ </tr>
+ <tr>
+ <td>++StopParams</td>
+ <td></td>
+ <td>List of parameters that will be passed to either StopImage or
+ StopClass. Parameters are separated using either <b>#</b> or
+ <b>;</b> character.</td>
+ </tr>
+ <tr>
+ <td>--StopTimeout</td>
+ <td>No Timeout</td>
+ <td>Defines the timeout in seconds that procrun waits for service to
+ exit gracefully.</td>
+ </tr>
+ <tr>
+ <td>--LogPath</td>
+ <td>%SystemRoot%\System32\LogFiles\Apache</td>
+ <td>Defines the path for logging. Creates the directory if necessary.</td>
+ </tr>
+ <tr>
+ <td>--LogPrefix</td>
+ <td>commons-daemon</td>
+ <td>Defines the service log filename prefix. The log file is created in the LogPath directory with
+ <code>.YEAR-MONTH-DAY.log</code> suffix</td>
+ </tr>
+ <tr>
+ <td>--LogLevel</td>
+ <td>Info</td>
+ <td>Defines the logging level and can be either <b>Error</b>,
+ <b>Info</b>, <b>Warn</b> or <b>Debug</b>. (Case insensitive).
+ </td>
+ </tr>
+ <tr>
+ <td>--LogJniMessages</td>
+ <td>0</td>
+ <td>Set this non-zero (e.g. 1) to capture JVM jni debug messages in the procrun log file.
+ Is not needed if stdout/stderr redirection is being used.
+ <!-- TODO: what if only one of stdout/stderr is being redirected? -->
+ Only applies to <b>jvm</b> mode.
+ </td>
+ </tr>
+ <tr>
+ <td>--StdOutput</td>
+ <td></td>
+ <td>Redirected stdout filename. If named <b>auto</b> file is created
+ inside <b>LogPath</b> with the name <b>service-stdout.YEAR-MONTH-DAY.log</b>.</td>
+ </tr>
+ <tr>
+ <td>--StdError</td>
+ <td></td>
+ <td>Redirected stderr filename. If named <b>auto</b> file is created
+ in the <b>LogPath</b> directory with the name <b>service-stderr.YEAR-MONTH-DAY.log</b>.</td>
+ </tr>
+ <tr>
+ <td>--PidFile</td>
+ <td></td>
+ <td>Defines the file name for storing the running process id.
+ Actual file is created in the <b>LogPath</b> directory</td>
+ </tr>
+ </table>
+</p>
+</subsection>
+<subsection name="Installing services">
+<p>
+To install the service, you need to use the <b>//IS</b> parameter.
+</p>
+<p>
+<screen>
+<h4>Install the service named 'TestService'</h4>
+<source>
+prunsrv //IS//TestService --DisplayName="Test Service" \
+ --Install=prunsrv.exe --Jvm=auto --StartMode=jvm --StopMode=jvm \
+ --StartClass=org.apache.SomeStartClass --StartParams=arg1;arg2;arg3 \
+ --StopClass=org.apache.SomeStopClass --StopParams=arg1#arg2
+</source>
+</screen>
+</p>
+</subsection>
+<subsection name="Updating services">
+<p>
+To update the service parameters, you need to use the <b>//US</b> parameter.
+</p>
+<p>
+<screen>
+<h4>Update the service named 'TestService'</h4>
+<source>
+prunsrv //US//TestService --Description="Some Dummy Test Service" \
+ --Startup=auto --Classpath=%CLASSPATH%;test.jar
+</source>
+</screen>
+</p>
+</subsection>
+<subsection name="Removing services">
+<p>
+To remove the service, you need to use the <b>//DS</b> parameter.
+If the service is running it will be stopped and then deleted.
+</p>
+<p>
+<screen>
+<h4>Remove the service named 'TestService'</h4>
+<source>prunsrv //DS//TestService</source>
+</screen>
+</p>
+</subsection>
+
+<subsection name="Debugging services">
+<p>
+To run the service in console mode, you need to use the <b>//TS</b> parameter.
+The service shutdown can be initiated by pressing <b>CTRL+C</b> or
+<b>CTRL+BREAK</b>.
+If you rename the prunsrv.exe to testservice.exe then you can just execute the
+testservice.exe and this command mode will be executed by default.
+</p>
+<p>
+<screen>
+<h4>Run the service named 'TestService' in console mode</h4>
+<source>prunsrv //TS//TestService [additional arguments]</source>
+</screen>
+</p>
+</subsection>
+
+</section>
+
+<section name="Using Procrun in jvm mode">
+<p>
+To interface with the Procrun service application (prunsrv) using the <b>jvm</b> mode,
+you need to create a class with the appropriate method(s).
+For example:
+<source>
+class MyClass;
+// N.B. error handling not shown
+static void main(String [] args){
+ String mode = args[0];
+ if ("start".equals(mode){
+ // process service start function
+ }
+ etc.
+}
+</source>
+This should be configured as follows:
+<source>
+--Classpath MyClass.jar
+--StartMode jvm --StartClass MyClass --StartParams start
+--StopMode jvm --StopClass MyClass --StopParams stop
+</source>
+The above example uses a single 'main' method, and uses a string parameter to specify whether the service function
+is start or stop.
+<br></br>
+Alternatively, you can use different method names for the service start and stop functions:
+<source>
+class MyClass;
+// N.B. error handling not shown
+static void start(String [] args){
+ // process service start function
+ }
+static void stop(String [] args){
+ // process service stop function
+ }
+}
+</source>
+This should be configured as follows:
+<source>
+--Classpath MyClass.jar
+--StartMode jvm --StartClass MyClass --StartMethod start
+--StopMode jvm --StopClass MyClass --StopMethod stop
+</source>
+Note: in jvm mode, the start method should not return until the stop method has
+been called. The start and stop methods are called from different threads.
+</p>
+</section>
+
+<section name="Using Procrun in Java or exe mode">
+<p>
+When using the <b>Java</b> or <b>exe</b> modes, the Procrun service application (prunsrv)
+launches the target application in a separate process.
+The "stop" application needs to communicate somehow with the "start" application to tell it to stop.
+For example, using RPC.
+</p>
+</section>
+
+<section name="Windows Registry Usage">
+<p>
+The basic Service definitions are maintained under the registry key:
+<source>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\<ServiceName></source>
+Additional parameters are stored in the registry at:
+<source>HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\ProcRun 2.0\<ServiceName>\Parameters</source>
+</p>
+<p>
+On 64-bit Windows procrun always uses 32-bit registry view for storing the configuration.
+This means that parameters will be stored inside:
+<source>HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\ProcRun 2.0\<ServiceName></source>
+</p>
+</section>
+</body>
+</document>