commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r980662 [14/15] - in /commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3: ./ src/ src/assembly/ src/docs/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/commons/ src/java/org/apache/commons/daemon/ src/java/org/apache/com...
Date Fri, 30 Jul 2010 06:50:16 GMT
Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/AloneService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.c?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.c (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.c Fri Jul 30 06:50:12 2010
@@ -0,0 +1,43 @@
+/* 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.
+ */
+
+/*
+ * Native routine to core JVM
+ */
+#include <jni.h>
+ 
+#ifndef _Included_Native
+#define _Included_Native
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     Native
+ * Method:    toto
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_SimpleDaemon_toto
+  (JNIEnv *env, jclass class) {
+    int i;
+    i = -1;
+    memcpy(&i, &i, i);
+    memset(&i, ' ', 1024);
+}
+ 
+#ifdef __cplusplus
+}
+#endif
+#endif

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.sh
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.sh?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.sh (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.sh Fri Jul 30 06:50:12 2010
@@ -0,0 +1,32 @@
+## 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.
+##
+# for linux ;-) and Mac OS X
+case `uname -s` in
+  Darwin)
+    JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
+    INCLUDE=Headers
+    OS=
+    FLAGS=-dynamiclib
+    ;;
+  Linux)
+    OS=linux
+    INCLUDE=include
+    FLAGS=-shared
+    ;;
+esac
+
+gcc -c -I${JAVA_HOME}/${INCLUDE} -I${JAVA_HOME}/${INCLUDE}/${OS} Native.c
+gcc ${FLAGS} -o Native.so Native.o

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/Native.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunService.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunService.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunService.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunService.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,173 @@
+import java.io.File;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/*
+ * 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.
+ * 
+ */
+
+/**
+ * Sample service implementation for use with Windows Procrun.
+ * <p>
+ * Use the main() method for running as a Java (external) service.
+ * Use the start() and stop() methods for running as a jvm (in-process) service 
+ */
+public class ProcrunService implements Runnable {
+
+    private static final int DEFAULT_PAUSE = 60; // Wait 1 minute
+    private static final long MS_PER_SEC = 1000L; // Milliseconds in a second
+
+    private static volatile Thread thrd; // start and stop are called from different threads
+    
+    private final long pause; // How long to pause in service loop
+
+    private final File stopFile;
+    
+    /**
+     * 
+     * @param wait seconds to wait in loop
+     * @param filename optional filename - if non-null, run loop will stop when it disappears
+     * @throws IOException 
+     */
+    private ProcrunService(long wait, File file) {
+        pause=wait;
+        stopFile = file;
+    }
+
+    private static File tmpFile(String filename) {
+        return new File(System.getProperty("java.io.tmpdir"),
+                filename != null ? filename : "ProcrunService.tmp");
+    }
+
+    private static void usage(){
+        System.err.println("Must supply the argument 'start' or 'stop'");        
+    }
+
+    /**
+     * Helper method for process args with defaults.
+     * 
+     * @param args array of string arguments, may be empty
+     * @param argnum which argument to extract
+     * @return the argument or null
+     */
+    private static String getArg(String[] args, int argnum){
+        if (args.length > argnum) {
+            return args[argnum];
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Common entry point for start and stop service functions.
+     * To allow for use with Java mode, a temporary file is created
+     * by the start service, and a deleted by the stop service.
+     * 
+     * @param args [start [pause time] | stop]
+     * @throws IOException if there are problems creating or deleting the temporary file 
+     */
+    public static void main(String[] args) throws IOException {
+        final int argc = args.length;
+        log("ProcrunService called with "+argc+" arguments from thread: "+Thread.currentThread());
+        for(int i=0; i < argc; i++) {
+            System.out.println("["+i+"] "+args[i]);
+        }
+        String mode=getArg(args, 0);
+        if ("start".equals(mode)){
+            File f = tmpFile(getArg(args, 2));
+            log("Creating file: "+f.getPath());
+            f.createNewFile();
+            startThread(getArg(args, 1), f);
+        } else if ("stop".equals(mode)) {
+            final File tmpFile = tmpFile(getArg(args, 1));
+            log("Deleting file: "+tmpFile.getPath());
+            tmpFile.delete();
+        } else {
+            usage();
+        }
+    }
+
+    /**
+     * Start the jvm version of the service, and waits for it to complete.
+     * 
+     * @param args optional, arg[0] = timeout (seconds)
+     */
+    public static void start(String [] args) {
+        startThread(getArg(args, 0), null);
+        while(thrd.isAlive()){
+            try {
+                thrd.join();
+            } catch (InterruptedException ie){
+                // Ignored
+            }
+        }
+    }
+
+    private static void startThread(String waitParam, File file) {
+        long wait = DEFAULT_PAUSE;
+        if (waitParam != null) {
+            wait = Integer.valueOf(waitParam).intValue();
+        }
+        log("Starting the thread, wait(seconds): "+wait);
+        thrd = new Thread(new ProcrunService(wait*MS_PER_SEC,file));
+        thrd.start();
+    }
+
+    /**
+     * Stop the JVM version of the service.
+     *
+     * @param args ignored
+     */
+    public static void stop(String [] args){
+        if (thrd != null) {
+            log("Interrupting the thread");
+            thrd.interrupt();
+        } else {
+            log("No thread to interrupt");
+        }        
+    }
+
+    /**
+     * This method performs the work of the service.
+     * In this case, it just logs a message every so often.
+     */
+    public void run() {
+        log("Started thread in "+System.getProperty("user.dir"));
+        log("user.name="+System.getProperty("user.name"));
+        log("user.home="+System.getProperty("user.home"));
+        while(stopFile == null || stopFile.exists()){
+            try {
+                log("pausing...");
+                Thread.sleep(pause);
+            } catch (InterruptedException e) {
+                log("Exitting");
+                break;
+            }
+        }
+    }
+
+    private static void log(String msg){
+        DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
+        System.out.println(df.format(new Date())+msg);
+    }
+    
+    protected void finalize(){
+        log("Finalize called from thread "+Thread.currentThread());
+    }
+}

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceInstall.cmd
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceInstall.cmd?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceInstall.cmd (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceInstall.cmd Fri Jul 30 06:50:12 2010
@@ -0,0 +1,65 @@
+@echo off
+rem 
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem Batch script for defining the ProcrunService (JVM and Java versions)
+
+rem Copy this file and ProcrunService.jar into the same directory as prunsrv (or adjust the paths below)
+
+setlocal
+
+rem The service names (make sure they does not clash with an existing service)
+set SERVICE_JVM=ProcrunServiceJvm
+set SERVICE_JAVA=ProcrunServiceJava
+
+rem my location
+set MYPATH=%~dp0
+
+rem location of Prunsrv
+set PATH_PRUNSRV=%MYPATH%
+set PR_LOGPATH=%PATH_PRUNSRV%
+rem location of jarfile
+set PATH_JAR=%MYPATH%
+
+rem Allow prunsrv to be overridden
+if "%PRUNSRV%" == "" set PRUNSRV=%PATH_PRUNSRV%prunsrv
+
+rem Install the 2 services
+
+echo Installing %SERVICE_JVM%
+%PRUNSRV% //DS//%SERVICE_JVM%
+%PRUNSRV% //IS//%SERVICE_JVM%
+
+echo Setting the parameters for %SERVICE_JVM%
+%PRUNSRV% //US//%SERVICE_JVM% --Jvm=auto --StdOutput auto --StdError auto ^
+--Classpath=%PATH_JAR%ProcrunService.jar ^
+--StartMode=jvm --StartClass=ProcrunService --StartMethod=start ^
+ --StopMode=jvm  --StopClass=ProcrunService  --StopMethod=stop
+
+echo Installation of %SERVICE_JVM% is complete
+
+echo Installing %SERVICE_JAVA%
+%PRUNSRV% //DS//%SERVICE_JAVA%
+%PRUNSRV% //IS//%SERVICE_JAVA%
+
+echo Setting the parameters for %SERVICE_JAVA%
+%PRUNSRV% //US//%SERVICE_JAVA% --Jvm=auto --StdOutput auto --StdError auto ^
+--Classpath=%PATH_JAR%ProcrunService.jar ^
+--StartMode=java --StartClass=ProcrunService --StartParams=start ^
+ --StopMode=java  --StopClass=ProcrunService  --StopParams=stop
+
+echo Installation of %SERVICE_JAVA% is complete
+echo Finished

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceInstall.cmd
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceRemove.cmd
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceRemove.cmd?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceRemove.cmd (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceRemove.cmd Fri Jul 30 06:50:12 2010
@@ -0,0 +1,42 @@
+@echo off
+rem 
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements.  See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem Batch script for removing the ProcrunService (JVM and Java versions)
+
+setlocal
+
+rem The service names (make sure they does not clash with an existing service)
+set SERVICE_JVM=ProcrunServiceJvm
+set SERVICE_JAVA=ProcrunServiceJava
+
+rem my location
+set MYPATH=%~dp0
+
+rem location of Prunsrv
+set PATH_PRUNSRV=%MYPATH%
+set PR_LOGPATH=%PATH_PRUNSRV%
+rem Allow prunsrv to be overridden
+if "%PRUNSRV%" == "" set PRUNSRV=%PATH_PRUNSRV%prunsrv
+
+echo Removing %SERVICE_JVM%
+%PRUNSRV% //DS//%SERVICE_JVM%
+
+echo Removing %SERVICE_JAVA%
+%PRUNSRV% //DS//%SERVICE_JAVA%
+%PRUNSRV% //IS//%SERVICE_JAVA%
+
+echo Finished

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ProcrunServiceRemove.cmd
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/README.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/README.txt?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/README.txt (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/README.txt Fri Jul 30 06:50:12 2010
@@ -0,0 +1,49 @@
+The directory contains examples of Java daemons.
+The examples are compiled using Ant (just type ant). Each example creates a
+jar file in ../../dist
+
+SimpleDaemon
+------------
+
+SimpleDaemon demonstrates the feature of the daemon offered by
+Apache Commons Daemon.
+To run it adapt the SimpleDaemon.sh file and connect to it using:
+telnet localhost 1200
+Additional information in ../native/unix/INSTALL.txt
+
+ServiceDaemon
+-------------
+
+ServiceDaemon allows to start programs using the Commons Daemon.
+
+That could be useful when using Cygwin under Win9x because Cygwin only offers
+services support under Win NT/2000/XP.
+(See in ../native/nt/README how to install jsvc as a service in Win32).
+
+It uses Apache Commons Collections:
+http://commons.apache.org/collections/
+To use it you need at least commons-collections-1.0
+Check in build.xml that the property commons-collections.jar correspond to thei
+location of your commons-collections.jar file.
+
+You have to create a file named startfile that uses a property format:
+name = string to start the program
+
+For example:
+sshd=/usr/sbin/sshd -D
+router1=/home/Standard/router/router pop3 pop3.example.net
+router2=/home/Standard/router/smtp smtp.example.net
+socks5=/usr/local/bin/socks5 -f
+
+To run it adapt the ServiceDaemon.sh file.
+
+AloneService
+------------
+
+AloneService is like ServiceDaemon except it does not use the Daemon interface.
+
+ProcrunService
+--------------
+This is a simple Windows Service application.
+It can be run either in Jvm or Java modes.
+See ProcrunServiceInstall.cmd for a sample installation script.
\ No newline at end of file

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,131 @@
+/*
+ *  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.
+ */
+
+/* @version $Id: ServiceDaemon.java 937350 2010-04-23 16:03:39Z sebb $ */
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Iterator;
+
+import org.apache.commons.collections.ExtendedProperties;
+import org.apache.commons.daemon.Daemon;
+import org.apache.commons.daemon.DaemonContext;
+
+public class ServiceDaemon implements Daemon {
+
+    private ExtendedProperties prop = null;
+    private Process proc[] = null;
+    private ServiceDaemonReadThread readout[] = null;
+    private ServiceDaemonReadThread readerr[] = null;
+
+    public ServiceDaemon() {
+        super();
+        System.err.println("ServiceDaemon: instance "+this.hashCode()+
+                           " created");
+    }
+
+    protected void finalize() {
+        System.err.println("ServiceDaemon: instance "+this.hashCode()+
+                           " garbage collected");
+    }
+
+    /**
+     * init and destroy were added in jakarta-tomcat-daemon.
+     */
+    public void init(DaemonContext context)
+    throws Exception {
+        /* Set the err */
+        System.setErr(new PrintStream(new FileOutputStream(new File("ServiceDaemon.err")),true));
+        System.err.println("ServiceDaemon: instance "+this.hashCode()+
+                           " init");
+
+        /* read the properties file */
+        prop = new ExtendedProperties("startfile");
+
+        /* create an array to store the processes */
+        int i=0;
+        for (Iterator e = prop.getKeys(); e.hasNext() ;) {
+            e.next();
+            i++;
+        }
+        System.err.println("ServiceDaemon: init for " + i + " processes");
+        proc = new Process[i];
+        readout = new ServiceDaemonReadThread[i];
+        readerr = new ServiceDaemonReadThread[i];
+        for (i=0;i<proc.length;i++) {
+            proc[i] = null;
+            readout[i] = null;
+            readerr[i] = null;
+        }
+
+        System.err.println("ServiceDaemon: init done ");
+
+    }
+
+    public void start() {
+        /* Dump a message */
+        System.err.println("ServiceDaemon: starting");
+
+        /* Start */
+        int i=0;
+        for (Iterator e = prop.getKeys(); e.hasNext() ;) {
+           String name = (String) e.next();
+           System.err.println("ServiceDaemon: starting: " + name + " : " + prop.getString(name));
+           try {
+               proc[i] = Runtime.getRuntime().exec(prop.getString(name));
+           } catch(Exception ex) {
+               System.err.println("Exception: " + ex);
+           }
+           /* Start threads to read from Error and Out streams */
+           readerr[i] =
+               new ServiceDaemonReadThread(proc[i].getErrorStream());
+           readout[i] =
+               new ServiceDaemonReadThread(proc[i].getInputStream());
+           readerr[i].start();
+           readout[i].start();
+           i++;
+        }
+    }
+
+    public void stop()
+    throws IOException, InterruptedException {
+        /* Dump a message */
+        System.err.println("ServiceDaemon: stopping");
+
+        for (int i=0;i<proc.length;i++) {
+            if ( proc[i]==null)
+               continue;
+            proc[i].destroy();
+            try {
+                proc[i].waitFor();
+            } catch(InterruptedException ex) {
+                System.err.println("ServiceDaemon: exception while stopping:" +
+                                    ex);
+            }
+        }
+
+        System.err.println("ServiceDaemon: stopped");
+    }
+
+    public void destroy() {
+        System.err.println("ServiceDaemon: instance "+this.hashCode()+
+                           " destroy");
+    }
+
+}

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.sh
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.sh?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.sh (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.sh Fri Jul 30 06:50:12 2010
@@ -0,0 +1,39 @@
+#!/bin/sh
+# 
+# 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.
+#
+# Small shell script to show how to start the sample services.
+#
+# Adapt the following lines to your configuration
+JAVA_HOME=/cygdrive/c/jdk1.3.1_02
+HOME=c:\\cygwin\\home\\Standard
+DAEMON_HOME=$HOME\\jakarta-commons-sandbox\\daemon
+DAEMON_HOME_SH=/home/Standard/jakarta-commons-sandbox/daemon
+TOMCAT_USER=jakarta
+CLASSPATH=\
+$DAEMON_HOME\\dist\\commons-daemon.jar\;\
+$HOME\\commons-collections-1.0\\commons-collections.jar\;\
+$DAEMON_HOME\\dist\\Service.jar
+
+$DAEMON_HOME_SH/dist/jsvc \
+    -home $JAVA_HOME \
+    -cp $CLASSPATH \
+    ServiceDaemon 
+#
+# To get a verbose JVM
+#-verbose \
+# To get a debug of jsvc.
+#-debug \

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemon.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemonReadThread.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemonReadThread.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemonReadThread.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemonReadThread.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,42 @@
+/*
+ *  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.
+ */
+
+/* @version $Id: ServiceDaemonReadThread.java 480469 2006-11-29 08:22:04Z bayard $ */
+import java.io.InputStream;
+import java.io.IOException;
+import java.lang.Thread;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+public class ServiceDaemonReadThread extends Thread {
+    private BufferedReader in;
+    ServiceDaemonReadThread(InputStream in) {
+            this.in = new BufferedReader(new InputStreamReader(in));
+        }
+    public void run() {
+        String buff;
+        for (;;) {
+            try {
+                buff = in.readLine();
+                if (buff == null) break;
+                System.err.print(in.readLine());
+            } catch (IOException ex) {
+                break; // Exit thread.
+            }
+        }
+    }
+}

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/ServiceDaemonReadThread.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,350 @@
+/*
+ *  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.
+ */
+
+/* @version $Id: SimpleDaemon.java 937350 2010-04-23 16:03:39Z sebb $ */
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.Vector;
+
+import org.apache.commons.daemon.Daemon;
+import org.apache.commons.daemon.DaemonContext;
+import org.apache.commons.daemon.DaemonController;
+
+public class SimpleDaemon implements Daemon, Runnable {
+
+    private ServerSocket server=null;
+    private Thread thread=null;
+    private DaemonController controller=null;
+    private volatile boolean stopping=false;
+    private String directory=null;
+    private final Vector handlers;
+
+    public static native void toto();
+
+    public SimpleDaemon() {
+        super();
+        System.err.println("SimpleDaemon: instance "+this.hashCode()+
+                           " created");
+        this.handlers=new Vector();
+    }
+
+    protected void finalize() {
+        System.err.println("SimpleDaemon: instance "+this.hashCode()+
+                           " garbage collected");
+    }
+
+    /**
+     * init and destroy were added in jakarta-tomcat-daemon.
+     */
+    public void init(DaemonContext context)
+    throws Exception {
+        System.err.println("SimpleDaemon: instance "+this.hashCode()+
+                           " init");
+
+        int port=1200;
+
+        String[] a = context.getArguments();
+
+        if (a.length>0) port=Integer.parseInt(a[0]);
+        if (a.length>1) this.directory=a[1];
+        else this.directory="/tmp";
+
+        /* Dump a message */
+        System.err.println("SimpleDaemon: loading on port "+port);
+
+        /* Set up this simple daemon */
+        this.controller=context.getController();
+        this.server=new ServerSocket(port);
+        this.thread=new Thread(this);
+    }
+
+    public void start() {
+        /* Dump a message */
+        System.err.println("SimpleDaemon: starting");
+
+        /* Start */
+        this.thread.start();
+    }
+
+    public void stop()
+    throws IOException, InterruptedException {
+        /* Dump a message */
+        System.err.println("SimpleDaemon: stopping");
+
+        /* Close the ServerSocket. This will make our thread to terminate */
+        this.stopping=true;
+        this.server.close();
+
+        /* Wait for the main thread to exit and dump a message */
+        this.thread.join(5000);
+        System.err.println("SimpleDaemon: stopped");
+    }
+
+    public void destroy() {
+        System.err.println("SimpleDaemon: instance "+this.hashCode()+
+                           " destroy");
+    }
+
+    public void run() {
+        int number=0;
+
+        System.err.println("SimpleDaemon: started acceptor loop");
+        try {
+            while(!this.stopping) {
+                Socket socket=this.server.accept();
+                Handler handler=new Handler(socket,this,this.controller);
+                handler.setConnectionNumber(number++);
+                handler.setDirectoryName(this.directory);
+                new Thread(handler).start();
+            }
+        } catch (IOException e) {
+            /* Don't dump any error message if we are stopping. A IOException
+               is generated when the ServerSocket is closed in stop() */
+            if (!this.stopping) e.printStackTrace(System.err);
+        }
+
+        /* Terminate all handlers that at this point are still open */
+        Enumeration openhandlers=this.handlers.elements();
+        while (openhandlers.hasMoreElements()) {
+            Handler handler=(Handler)openhandlers.nextElement();
+            System.err.println("SimpleDaemon: dropping connection "+
+                               handler.getConnectionNumber());
+            handler.close();
+        }
+
+        System.err.println("SimpleDaemon: exiting acceptor loop");
+    }
+
+    protected void addHandler(Handler handler) {
+        synchronized (handler) {
+            this.handlers.add(handler);
+        }
+    }
+
+    protected void removeHandler(Handler handler) {
+        synchronized (handler) {
+            this.handlers.remove(handler);
+        }
+    }
+
+    public static class Handler implements Runnable {
+
+        private final DaemonController controller;
+        private final SimpleDaemon parent;
+        private String directory=null; // Only set before thread is started
+        private final Socket socket;
+        private int number=0; // Only set before thread is started
+
+        public Handler(Socket s, SimpleDaemon p, DaemonController c) {
+            super();
+            this.socket=s;
+            this.parent=p;
+            this.controller=c;
+        }
+
+        public void run() {
+            this.parent.addHandler(this);
+            System.err.println("SimpleDaemon: connection "+this.number+
+                               " opened from "+this.socket.getInetAddress());
+            try {
+                InputStream in=this.socket.getInputStream();
+                OutputStream out=this.socket.getOutputStream();
+                handle(in,out);
+                this.socket.close();
+            } catch (IOException e) {
+                e.printStackTrace(System.err);
+            }
+            System.err.println("SimpleDaemon: connection "+this.number+
+                               " closed");
+            this.parent.removeHandler(this);
+        }
+
+        public void close() {
+            try {
+                this.socket.close();
+            } catch (IOException e) {
+                e.printStackTrace(System.err);
+            }
+        }
+
+        public void setConnectionNumber(int number) {
+            this.number=number;
+        }
+
+        public int getConnectionNumber() {
+            return(this.number);
+        }
+
+        public void setDirectoryName(String directory) {
+            this.directory=directory;
+        }
+
+        public String getDirectoryName() {
+            return(this.directory);
+        }
+
+        public void createFile(String name)
+        throws IOException {
+            OutputStream file=new FileOutputStream(name,true);
+            PrintStream out=new PrintStream(file);
+            SimpleDateFormat fmt=new SimpleDateFormat();
+
+            out.println(fmt.format(new Date()));
+            out.close();
+            file.close();
+        }
+
+        public void createDir(String name)
+        throws IOException {
+            File file = new File(name);
+            boolean ok = file.mkdirs();
+            if(! ok)
+                throw new IOException("mkdirs for "+name+" failed");
+            createFile(name);
+        }
+
+        public void handle(InputStream in, OutputStream os) {
+            PrintStream out=null;
+            try {
+                out=new PrintStream(os, true, "US-ASCII");
+            } catch (UnsupportedEncodingException ex) {
+                out=new PrintStream(os);
+            }
+
+            while(true) {
+                try {
+                    /* If we don't have data in the System InputStream, we want
+                       to ask to the user for an option. */
+                    if (in.available()==0) {
+                        out.println();
+                        out.println("Please select one of the following:");
+                        out.println("    1) Shutdown");
+                        out.println("    2) Reload");
+                        out.println("    3) Create a file");
+                        out.println("    4) Disconnect");
+                        out.println("    5) Cause a core of the JVM");
+                        out.println("    6) Create a directory");
+                        out.print("Your choice: ");
+                    }
+
+                    /* Read an option from the client */
+                    int x=in.read();
+
+                    switch (x) {
+                        /* If the socket was closed, we simply return */
+                        case -1:
+                            return;
+
+                        /* Attempt to shutdown */
+                        case '1':
+                            out.println("Attempting a shutdown...");
+                            try {
+                                this.controller.shutdown();
+                            } catch (IllegalStateException e) {
+                                out.println();
+                                out.println("Can't shutdown now");
+                                e.printStackTrace(out);
+                            }
+                            break;
+
+                        /* Attempt to reload */
+                        case '2':
+                            out.println("Attempting a reload...");
+                            try {
+                                this.controller.reload();
+                            } catch (IllegalStateException e) {
+                                out.println();
+                                out.println("Can't reload now");
+                                e.printStackTrace(out);
+                            }
+                            break;
+
+                        /* Create a file */
+                        case '3':
+                            String name=this.getDirectoryName()+
+                                        "/SimpleDaemon."+
+                                        this.getConnectionNumber()+
+                                        ".tmp";
+                            try {
+                                this.createFile(name);
+                                out.println("File '"+name+"' created");
+                            } catch (IOException e) {
+                                e.printStackTrace(out);
+                            }
+                            break;
+
+                        /* Disconnect */
+                        case '4':
+                            out.println("Disconnecting...");
+                            return;
+
+                        /* Crash JVM in a native call: It need an so file ;-) */
+                        case '5':
+                            System.load(System.getProperty("native.library", "./Native.so"));
+                            toto();
+                            break;
+
+                        /* Create a directory (PR 30177 with 1.4.x and 1.5.0 */
+                        case '6':
+                            String name1=this.getDirectoryName()+
+                                        "/a/b/c/d/e"+
+                                        "/SimpleDaemon."+
+                                        this.getConnectionNumber()+
+                                        ".tmp";
+                            try {
+                                this.createDir(name1);
+                                out.println("File '"+name1+"' created");
+                            } catch (IOException e) {
+                                e.printStackTrace(out);
+                            }
+                            break;
+
+
+                        /* Discard any carriage return / newline characters */
+                        case '\r':
+                        case '\n':
+                            break;
+
+                        /* We got something that we weren't supposed to get */
+                        default:
+                            out.println("Unknown option '"+(char)x+"'");
+                            break;
+
+                    }
+
+                /* If we get an IOException we return (disconnect) */
+                } catch (IOException e) {
+                    System.err.println("SimpleDaemon: IOException in "+
+                                       "connection "+
+                                       this.getConnectionNumber());
+                    return;
+                }
+            }
+        }
+    }
+}

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.sh
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.sh?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.sh (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.sh Fri Jul 30 06:50:12 2010
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# 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.
+#
+# Small shell script to show how to start the sample services.
+#
+# Adapt the following lines to your configuration
+JAVA_HOME=`echo $JAVA_HOME`
+#JAVA_HOME=/opt/java
+#JAVA_HOME=/opt/kaffe
+DAEMON_HOME=`(cd ../..; pwd)`
+TOMCAT_USER=`echo $USER`
+CLASSPATH=\
+$DAEMON_HOME/dist/commons-daemon.jar:\
+$DAEMON_HOME/dist/SimpleDaemon.jar
+
+PATH=$PATH:$DAEMON_HOME/src/native/unix
+export PATH
+
+# library could be used to test restart after a core.
+#    -Dnative.library=${DAEMON_HOME}/src/samples/Native.so \
+
+# options below are for kaffe.
+#    -Xclasspath/a:$CLASSPATH \
+#    (to debug the class loader
+#    -vmdebug VMCLASSLOADER \
+
+# option below is for the sun JVM.
+#    -cp $CLASSPATH \
+
+if [ -f $JAVA_HOME/bin/kaffe ]
+then
+  CLOPT="-Xclasspath/a:$CLASSPATH"
+else
+  CLOPT="-cp $CLASSPATH"
+fi
+
+jsvc \
+    -user $TOMCAT_USER \
+    -home $JAVA_HOME \
+    $CLOPT \
+    -pidfile ./pidfile \
+    -wait 90 \
+    -debug \
+    -outfile toto.txt \
+    -errfile '&1' \
+    -Dnative.library=${DAEMON_HOME}/src/samples/Native.so \
+    SimpleDaemon \
+#
+# To get a verbose JVM (sun JVM for example)
+#-verbose \
+# To get a debug of jsvc.
+#-debug \
+
+echo "result: $?"

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.sh
------------------------------------------------------------------------------
    svn:eol-style = LF

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/SimpleDaemon.sh
------------------------------------------------------------------------------
    svn:executable = *

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/build.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/build.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/build.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/build.xml Fri Jul 30 06:50:12 2010
@@ -0,0 +1,123 @@
+<!--
+ 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="."/>
+
+  <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+  <property name="commons-collections.jar" value="${maven.repo.local}/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
+
+  <target name="jars" depends="SimpleDaemon,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="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"/>
+    <pathelement location="${commons-collections.jar}"/>
+  </path>
+
+</project>

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/samples/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/resources/images/logo.gif
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/resources/images/logo.gif?rev=980662&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/resources/images/logo.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/resources/images/logo.png
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/resources/images/logo.png?rev=980662&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/resources/images/logo.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/site.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/site.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/site.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/site.xml Fri Jul 30 06:50:12 2010
@@ -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>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="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"/>
+            <item name="Javadoc (SVN latest)"    href="apidocs/index.html"/>
+        </menu>
+
+    </body>
+
+</project>

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/site.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/binaries.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/binaries.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/binaries.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/binaries.xml Fri Jul 30 06:50:12 2010
@@ -0,0 +1,83 @@
+<?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. If your machine is not in the list,
+please mail us and we will try to make it available, or you can try to build it on your own.
+The non-Windows files are compressed tar files. They are named <code>commons-daemon-m.n.p-bin-os-hw.tar.gz</code>.
+For example: In the directory <code>linux</code> we have <code>commons-daemon-1.0.3-bin-linux-i686.tar.gz</code>
+That is a file suitable for a Linux system running on Intel hardware.
+Windows builds are provided as a zip file.
+</p>
+</section>
+
+<section name="How do I get the executable?">
+<subsection name="jsvc">
+<p>
+Do the following:
+<ul>
+  <li>Find the tar.gz file corresponding to your configuration.</li>
+  <li>Download it.</li>
+  <li>Uncompress the tar file and extract the contents (better with gnu tar).
+  There should be an executable file called <code>jsvc</code> and some text files</li>
+  <li>Copy the executable to the location where you want to run it.</li>
+  <li>Write a suitable shell script
+     (see in <code>src/samples</code> and <code>src/native/unix/native/Tomcat.sh</code>)
+     to get your Java application started as a daemon.
+  </li>
+</ul>
+</p>
+</subsection>
+<subsection name="procrun">
+<p>
+The Windows archive (e.g. commons-daemon-1.0.3-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 64-bit</li>
+<li>ia64 - Intel 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>

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/binaries.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/download_daemon.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/download_daemon.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/download_daemon.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/download_daemon.xml Fri Jul 30 06:50:12 2010
@@ -0,0 +1,154 @@
+<?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:download-page                      |
+ |                                                                      |
+ | 2) Set the following properties in the component's pom:              |
+ |    - commons.componentid (required, alphabetic, lower case)          |
+ |    - commons.release.version (required)                              |
+ |    - commons.binary.suffix (optional)                                |
+ |      (defaults to "-bin", set to "" for pre-maven2 releases)         |
+ |                                                                      |
+ | 3) Example Properties                                                |
+ |                                                                      |
+ |  <properties>                                                        |
+ |    <commons.componentid>math</commons.componentid>                   |
+ |    <commons.release.version>1.2</commons.release.version>            |
+ |  </properties>                                                       |
+ |                                                                      |
+ +======================================================================+
+-->
+<document>
+  <properties>
+    <title>Download Commons Daemon</title>
+    <author email="dev@commons.apache.org">Commons Documentation Team</author>
+  </properties>
+  <body>
+    <section name="Download Commons Daemon">
+    <subsection name="Using a Mirror">
+      <p>
+        We recommend you use a mirror to download our release
+        builds, but you <strong>must</strong> verify the integrity of
+        the downloaded files using signatures downloaded from our main 
+        distribution directories. Recent releases (48 hours) may not yet
+        be available from 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>
+        The <a href="http://www.apache.org/dist/commons/KEYS">KEYS</a>
+        link links to the code signing keys used to sign the product.
+        The <code>PGP</code> link downloads the OpenPGP compatible signature from our main site. 
+        The <code>MD5</code> link downloads the checksum from the main site.
+      </p>
+    </subsection>
+    </section>
+    <section name="Commons Daemon 1.0.3 ">
+      <subsection name="Binaries">
+        <table>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/binaries/commons-daemon-1.0.3-bin.tar.gz">commons-daemon-1.0.3-bin.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.0.3-bin.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.0.3-bin.tar.gz.asc">pgp</a></td>
+          </tr>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/binaries/commons-daemon-1.0.3-bin.zip">commons-daemon-1.0.3-bin.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.0.3-bin.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/binaries/commons-daemon-1.0.3-bin.zip.asc">pgp</a></td>
+          </tr>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/binaries/1.0.3/">Browse native binaries download area...</a></td>
+              <td></td>
+              <td></td>
+          </tr>
+        </table>
+      </subsection>
+      <subsection name="Source">
+        <table>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/source/commons-daemon-1.0.3-src.tar.gz">commons-daemon-1.0.3-src.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-src.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-src.tar.gz.asc">pgp</a></td>
+          </tr>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/source/commons-daemon-1.0.3-src.zip">commons-daemon-1.0.3-src.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-src.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-src.zip.asc">pgp</a></td>
+          </tr>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/source/commons-daemon-1.0.3-native-src.tar.gz">commons-daemon-1.0.3-native-src.tar.gz</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-native-src.tar.gz.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-native-src.tar.gz.asc">pgp</a></td>
+          </tr>
+          <tr>
+              <td><a href="[preferred]/commons/daemon/source/commons-daemon-1.0.3-native-src.zip">commons-daemon-1.0.3-native-src.zip</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-native-src.zip.md5">md5</a></td>
+              <td><a href="http://www.apache.org/dist/commons/daemon/source/commons-daemon-1.0.3-native-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="http://archive.apache.org/dist/commons/daemon/">Archives...</a></li>
+        </ul>
+    </section>
+  </body>
+</document>
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/download_daemon.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/faq.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/faq.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/faq.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/faq.xml Fri Jul 30 06:50:12 2010
@@ -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>

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/faq.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/index.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/index.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/index.xml Fri Jul 30 06:50:12 2010
@@ -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>

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/index.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/issue-tracking.xml
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/issue-tracking.xml?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/issue-tracking.xml (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/issue-tracking.xml Fri Jul 30 06:50:12 2010
@@ -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>Commons Daemon Issue tracking</title>
+    <author email="dev@commons.apache.org">Commons Documentation Team</author>
+  </properties>
+  <body>
+
+    <section name="Commons Daemon Issue tracking">
+      <p>
+      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
+      Commons Daemon please do the following:
+      <ol>
+        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310468&amp;sorter/field=issuekey&amp;sorter/order=DESC&amp;status=1&amp;status=3&amp;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&amp;issuetype=1&amp;priority=4&amp;assignee=-1">bug report</a>
+            or <a href="http://issues.apache.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310468&amp;issuetype=4&amp;priority=4&amp;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 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&amp;pid=12310468&amp;sorter/field=issuekey&amp;sorter/order=DESC&amp;status=1&amp;status=3&amp;status=4">All Open Commons Daemon bugs</a></li>
+        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310468&amp;sorter/field=issuekey&amp;sorter/order=DESC&amp;status=5&amp;status=6">All Resolved Commons Daemon bugs</a></li>
+        <li><a href="http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&amp;pid=12310468&amp;sorter/field=issuekey&amp;sorter/order=DESC">All Commons Daemon bugs</a></li>
+      </ul>
+      </p>
+    </section>
+  </body>
+</document>

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/site/xdoc/issue-tracking.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message