commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r980662 [2/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/comm...
Date Fri, 30 Jul 2010 06:50:16 GMT
Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/docs/daemon.html
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/docs/daemon.html?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/docs/daemon.html (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/docs/daemon.html Fri Jul 30 06:50:12 2010
@@ -0,0 +1,277 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!--
+ 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.
+-->
+<HTML>
+  <HEAD>
+    <TITLE>Apache Daemon Specification - Version 1.0</TITLE>
+    <LINK REL="stylesheet" TYPE="text/css" HREF="daemon.css" TITLE="daemon">
+    <META HTTP-EQUIV="content-type" CONTENT="text/html; charset=ISO-8859-1">
+  </HEAD>
+  <BODY>
+
+    <H1>Apache Daemon Specification</H1>
+    <H4>Version 1.0</H4>
+  
+    <P CLASS="note">
+      <strong>Abstract:</strong>
+      This document specifies the behavior and life cycle of an abstract
+      Java&trade; daemon, in relation to its native container. In addition
+      it defines a mechanism for controlling a daemon, and its interaction
+      with the native OS process in which its existance is confined.
+    </P>
+  
+    <H2>Index</H2>
+    <OL>
+      <LI><A HREF="#1">Introduction</A>
+      <LI><A HREF="#2">Scope of this specification</A>
+      <LI><A HREF="#3">The Daemon interface and its life cycle</A>
+      <OL>
+        <LI><A HREF="#3A">Instantiation</A>
+        <LI><A HREF="#3B">Initialization</A>
+        <LI><A HREF="#3C">Startup</A>
+        <LI><A HREF="#3D">Stop</A>
+        <LI><A HREF="#3E">Destruction</A>
+      </OL>
+    </OL>
+
+    <A NAME="1"><H2>Introduction</H2></A>
+    <P>
+      Since 1994, the Java&trade; programming language evolved and became a
+      valid tool to develop, other than applets and client applications,
+      reliable and performant server applications. The major disadvantage of
+      the Java&trade; platform is that still today the only portable way to
+      start a Java&trade; applcation 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, implies
+      several disadvantages and risks: for example in case of a system-wide
+      shutdown, it might happen that the Virtual Machine process will be shut
+      down directly by the operating system, without notifying the running
+      server application. Or, for example, if an attacker finds out what is
+      the required message to send to the server, and discovers a way to send
+      this message to the running server application, he can easily interrupt
+      the operation of a server, bypassing all the security restrictions
+      implemented in the operating system.
+    </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>daemons</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>
+
+    <A NAME="2"><H2>Scope of this specification</H2></A>
+    <P>
+      The scope of this specification is to define an API in line with the
+      current Java&trade; Platform APIs to support an alternative invocation
+      mechanism which could be used instead of the above mentioned
+      <CODE><EM CLASS="key">public static void</EM> main(<EM CLASS="ref">String</EM>[])</CODE>
+      method. This specification cover the behavior and life cycle of what
+      we define as &quot;Java &trade; daemons&quot;, or, in other words,
+      non interactive Java&trade; applications.
+    </P>
+    <P>
+      This specification does not cover how the container of a Java&trade;
+      daemon must be implemented, or how to build a native liaison between
+      the operating system and the <CODE><EM CLASS="ref">Daemon</EM></CODE>
+      interface, but defines the relation between the an operating system
+      process and the <CODE><EM CLASS="ref">Daemon</EM></CODE> implementation
+      life cycle. It should be trivial for implementors to build a native
+      liaison and container for Java&trade; daemons.
+    </P>
+    <P>
+      This specification, together with the related API documentation, can be
+      used by software deveopers to build portable non interactive applications
+      based on the Java&trade; platform.
+    </P>
+
+    <A NAME="3"><H2>The Daemon interface and its life cycle</H2></A>
+    <P>
+      The <CODE><EM CLASS="ref">Daemon</EM></CODE> interface (defined as
+      follows) is the main interface representing a Java&trade; daemon:
+    </P>
+<PRE>
+<EM CLASS="key">package</EM> org.apache.commons.daemon;
+
+<EM CLASS="key">public interface</EM> <EM CLASS="ref">Daemon</EM>
+<EM CLASS="key">extends</EM> <EM CLASS="ref">Runnable</EM> {
+
+    <EM CLASS="key">public void</EM> init(<EM CLASS="ref">DaemonContext</EM> context)
+    throws <EM CLASS="ref">Exception</EM>;
+
+    <EM CLASS="key">public void</EM> run();
+
+    <EM CLASS="key">public void</EM> die();
+
+    <EM CLASS="key">public void</EM> destroy();
+}</PRE>
+    <P>
+      A daemon is managed through a well defined life cycle that defines how
+      it is loaded, initialized, started, stopped and destroyed. This life
+      cycle is expressed in the API by the <CODE>init(...)</CODE>,
+      <CODE>run()</CODE>, <CODE>die()</CODE> and <CODE>destroy()</CODE> methods
+      of the <CODE><EM CLASS="ref">Daemon</EM></CODE> interface.
+    </P>
+
+    <A NAME="3A"><H3>Instantiation</H3></A>
+    <P>
+      The daemon container is responsible for instantiating daemons. Because
+      of this, concrete implementations of the <CODE><EM CLASS="ref">Daemon</EM></CODE>
+      interface must always expose a public void constructor, which will be
+      used by the daemon container to create instances of the class.
+      For example:
+    </P>
+
+<PRE>
+<EM CLASS="key">package</EM> mypackage;
+
+<EM CLASS="key">import</EM> org.apache.commons.daemon.*;
+
+
+<EM CLASS="key">public class</EM> <EM CLASS="ref">MyDaemon</EM>
+<EM CLASS="key">implements</EM> <EM CLASS="ref">Daemon</EM> {
+
+    <EM CLASS="com">/** This constructor must be here. */</EM>
+    <EM CLASS="key">public</EM> MyDaemon() {
+        super();
+        ...
+    }
+    ...
+}</PRE>
+    <P>
+      Once the Virtual Machine process is started in the underlying operating
+      system, and the Virtual Machine itself is created and configured, the
+      daemon container associated with its native liaison constructs a new
+      instance of the concrete class implementing the
+      <CODE><EM CLASS="ref">Daemon</EM></CODE> instance. It is not defined by
+      this specification how the instance is constructed, or how many instances
+      of one or more concrete daemons implementation can coexist in the same
+      Virtual Machine.
+    </P>
+    <P>
+      As a side note, in case of multiple daemons running within the scope
+      of the same virtual machine, developers should not rely on static
+      methods and variables for proper operation, as it is advisable for
+      security reasons to load each different daemon instance in a separate
+      class loader.
+    </P>
+
+    <A NAME="3B"><H3>Initialization</H3></A>
+    <P>
+      After the daemon instance has been constructed, the container must
+      initialize it before it can be started. Initialization is provided so
+      that a daemon can read persisten configuration data, access native
+      resources, and perform other one-time activities.
+    </P>
+    <P>
+      Under certain operating systems (typically Unix based operating systems),
+      and if the native liaison of the container supports and it is configured
+      accordingly, this method might be called with super-user privileges.
+      For example, within the scope of this method, it might be wise to create
+      all required <CODE><EM CLASS="ref">ServerSocket</EM></CODE> instances (as
+      under several operating systems this requires super-user privileges).
+    </P>
+    <P>
+      That said, it is very important that within the scope of this method
+      &quot;untrusted&quot; data cannot be processed (for example, starting
+      an acceptor thread on a <CODE><EM CLASS="ref">ServerSocket</EM></CODE>
+      which receives and processes data from unknown sources), as this would
+      serious security hazards.
+    </P>
+    <P>
+      The daemon container must guarantee that the <CODE>init(...)</CODE>
+      method is called at least once, and only once on an instance of a
+      daemon object, and that it will be called before any access to the
+      <CODE>run()</CODE>, <CODE>die()</CODE> or <CODE>destroy()</CODE>
+      methods.
+    </P>
+    <P>
+      During initialization, the daemon instance can throw any
+      <CODE><EM CLASS="ref">Exception</EM></CODE> preventing a the successful
+      completion of the <CODE>init(...)</CODE> method. In this case the daemon
+      instance must not be started, and the <CODE>destroy()</CODE> method must
+      not be called before the instance is released by the container to allow
+      garbage collecting.
+    </P>
+
+    <A NAME="3C"><H3>Startup</H3></A>
+    <P>
+      As the <CODE><EM CLASS="ref">Daemon</EM></CODE> interface extends the
+      <CODE><EM CLASS="ref">Runnable</EM></CODE> interface, to start the
+      operation of a daemon, the container calls the <CODE>run()</CODE> method
+      within the scope of a <CODE><EM CLASS="ref">Thread</EM></CODE>. A
+      daemon is said to be &quot;running&quot; until the thread
+    </P>
+
+
+
+    <HR>
+    <P CLASS="copyright">
+      Author Pier Fumagalli
+      <A HREF="mailto:pier.fumagalli@sun.com">&lt;pier.fumagalli@sun.com&gt;</A>
+      <BR>
+      Copyright &copy; 2001, The Apache Software Foundation
+      <A HREF="http://www.apache.org/">&lt;http://www.apache.org/&gt;</A>
+      <BR>
+      All rights reserved.
+    </P>
+
+    <P CLASS="copyright">
+      Sun, Sun Microsystems, Solaris, and Java are trademarks or registered
+      trademarks of Sun Microsystems, Inc.
+      <A HREF="http://www.sun.com/">&lt;http://www.sun.com/&gt;</A>
+      <BR>
+      UNIX&reg; is a registered trademark in the United States and other
+      countries, exclusively licensed through X/Open Company, Ltd.
+      <A HREF="http://www.opengroup.org/">&lt;http://www.opengroup.org/&gt;</A>
+      <BR>
+      Windows, WinNT and Win32 are registered trademark of Microsoft Corp.
+      <A HREF="http://www.microsoft.com/">&lt;http://www.microsoft.com/&gt;</A>
+    </P>
+    </P>
+  </BODY>
+</HTML>

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

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/Daemon.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/Daemon.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/Daemon.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/Daemon.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,104 @@
+/*
+ *  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.
+ */
+
+package org.apache.commons.daemon;
+
+/**
+ * This interface provides support for native daemon invocation. Using
+ * a platform dependant helper program, classes that implement the
+ * <code>Daemon</code> interface can be initialized, started and
+ * stopped according to the conventions of the underlying operating
+ * system.
+ * <p>
+ * Implementors of this interface must also provide a public constructor
+ * with no arguments so that instances can be created in an automated
+ * fashion.
+ * </p>
+ * @author Pier Fumagalli
+ * @version 1.0 <i>(CVS $Revision: 925054 $)</i>
+ */
+public interface Daemon
+{
+
+    /**
+     * Initialize this <code>Daemon</code> instance.
+     * <p>
+     *   This method gets called once the JVM process is created and the
+     *   <code>Daemon</code> instance is created thru its empty public
+     *   constructor.
+     * </p>
+     * <p>
+     *   Under certain operating systems (typically Unix based operating
+     *   systems) and if the native invocation framework is configured to do
+     *   so, this method might be called with <i>super-user</i> privileges.
+     * </p>
+     * <p>
+     *   For example, it might be wise to create <code>ServerSocket</code>
+     *   instances within the scope of this method, and perform all operations
+     *   requiring <i>super-user</i> privileges in the underlying operating
+     *   system.
+     * </p>
+     * <p>
+     *   Apart from set up and allocation of native resources, this method
+     *   must not start the actual operation of the <code>Daemon</code> (such
+     *   as starting threads calling the <code>ServerSocket.accept()</code>
+     *   method) as this would impose some serious security hazards. The
+     *   start of operation must be performed in the <code>start()</code>
+     *   method.
+     * </p>
+     *
+     * @param context A <code>DaemonContext</code> object used to
+     * communicate with the container.
+     *
+     * @exception Exception Any exception preventing a successful
+     *                      initialization.
+     */
+    public void init(DaemonContext context)
+        throws Exception;
+
+    /**
+     * Start the operation of this <code>Daemon</code> instance. This
+     * method is to be invoked by the environment after the init()
+     * method has been successfully invoked and possibly the security
+     * level of the JVM has been dropped. Implementors of this
+     * method are free to start any number of threads, but need to
+     * return control after having done that to enable invocation of
+     * the stop()-method.
+     */
+    public void start()
+        throws Exception;
+
+    /**
+     * Stop the operation of this <code>Daemon</code> instance. Note
+     * that the proper place to free any allocated resources such as
+     * sockets or file descriptors is in the destroy method, as the
+     * container may restart the Daemon by calling start() after
+     * stop().
+     */
+    public void stop()
+        throws Exception;
+
+    /**
+     * Free any resources allocated by this daemon such as file
+     * descriptors or sockets. This method gets called by the container
+     * after stop() has been called, before the JVM exits. The Daemon
+     * can not be restarted after this method has been called without a
+     * new call to the init() method.
+     */
+    public void destroy();
+}
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/Daemon.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonContext.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonContext.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonContext.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonContext.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,47 @@
+/*
+ *  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.
+ */
+
+package org.apache.commons.daemon;
+
+
+/**
+ * Defines a set of methods that a Daemon instance can use to
+ * communicate with the Daemon container.
+ *
+ * @author Pier Fumagalli
+ * @version 1.0 <i>(SVN $Revision: 923123 $)</i>
+ */
+public interface DaemonContext
+{
+
+    /**
+     * Returns  <code>DaemonController</code> object that can be used
+     * to control the <code>Daemon</code> instance that this
+     * <code>DaemonContext</code> is passed to.
+     */
+    public DaemonController getController();
+
+    /**
+     * Returns an array of <code>String</code> arguments supplied by
+     * the environment.  corresponding to the array of arguments given
+     * in the <code>public static void main()</code> method used as an
+     * entry point to most other java programs.
+     */
+    public String[] getArguments();
+
+}
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonController.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonController.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonController.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonController.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,67 @@
+/*
+ *  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.
+ */
+
+package org.apache.commons.daemon;
+
+
+/**
+ * Interface which defines methods needed by the DaemonLoader.
+ * 
+ * @author Pier Fumagalli
+ * @version 1.0 <i>(SVN $Revision: 925054 $)</i>
+ */
+public interface DaemonController
+{
+
+    /**
+     * Shutdown the daemon.     
+     */
+    public void shutdown()
+        throws IllegalStateException;
+
+    /**
+     * Reload daemon
+     */
+    public void reload()
+        throws IllegalStateException;
+
+    /**
+     * Shudown daemon and log failed message.
+     */
+    public void fail()
+        throws IllegalStateException;
+
+    /**
+     * Shudown daemon and log failed message.
+     */
+    public void fail(String message)
+        throws IllegalStateException;
+
+    /**
+     * Shudown daemon and log failed message.
+     */
+    public void fail(Exception exception)
+        throws IllegalStateException;
+
+    /**
+     * Shudown daemon and log failed message.
+     */
+    public void fail(String message, Exception exception)
+        throws IllegalStateException;
+
+}
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonListener.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonListener.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonListener.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonListener.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,30 @@
+/*
+ *  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.
+ */
+
+package org.apache.commons.daemon;
+
+import java.util.EventListener;
+
+/**
+ * EvenListener type wrapper.
+ * @version 1.0 <i>(SVN $Revision: 923123 $)</i>
+ */
+public interface DaemonListener extends EventListener
+{
+
+}
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonPermission.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonPermission.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonPermission.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonPermission.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,422 @@
+/*
+ *  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.
+ */
+
+package org.apache.commons.daemon;
+
+import java.security.Permission;
+import java.util.StringTokenizer;
+
+/**
+ * This class represents the permissions to control and query the status of
+ * a <code>Daemon</code>. A <code>DaemonPermission</code> consists of a
+ * target name and a list of actions associated with it.
+ * <p>
+ * In this specification version the only available target name for this
+ * permission is &quot;control&quot;, but further releases may add more target
+ * names to fine-tune the access that needs to be granted to the caller.
+ * </p>
+ * <p>
+ * Actions are defined by a string of comma-separated values, as shown in the
+ * table below. The empty string implies no permission at all, while the
+ * special &quot;*&quot; value implies all permissions for the given
+ * name:
+ * </p>
+ * <p>
+ * <table width="100%" border="1">
+ *  <tr>
+ *   <th>Target&quot;Name</th>
+ *   <th>Action</th>
+ *   <th>Description</th>
+ *  </tr>
+ *  <tr>
+ *   <td rowspan="5">&quot;control&quot;</td>
+ *   <td>&quot;start&quot;</td>
+ *   <td>
+ *    The permission to call the <code>start()</code> method in an instance
+ *    of a <code>DaemonController</code> interface.
+ *   </td>
+ *  </tr>
+ *  <tr>
+ *   <td>&quot;stop&quot;</td>
+ *   <td>
+ *    The permission to call the <code>stop()</code> method in an instance
+ *    of a <code>DaemonController</code> interface.
+ *   </td>
+ *  </tr>
+ *  <tr>
+ *   <td>&quot;shutdown&quot;</td>
+ *   <td>
+ *    The permission to call the <code>shutdown()</code> method in an instance
+ *    of a <code>DaemonController</code> interface.
+ *   </td>
+ *  </tr>
+ *  <tr>
+ *   <td>&quot;reload&quot;</td>
+ *   <td>
+ *    The permission to call the <code>reload()</code> method in an instance
+ *    of a <code>DaemonController</code> interface.
+ *   </td>
+ *  </tr>
+ *  <tr>
+ *   <td>&quot;*&quot;</td>
+ *   <td>
+ *    The special wildcard action implies all above-mentioned action. This is
+ *    equal to construct a permission with the &quot;start, stop, shutdown,
+ *    reload&quot; list of actions.
+ *   </td>
+ *  </tr>
+ * </table>
+ * </p>
+ *
+ * @author Pier Fumagalli
+ * @version 1.0 <i>(SVN $Revision: 937348 $)</i>
+ */
+public final class DaemonPermission extends Permission
+{
+
+    /* ====================================================================
+     * Constants.
+     */
+
+    /**
+     * The target name when associated with control actions
+     * (&quot;control&quot;).
+     */
+    protected static final String CONTROL = "control";
+
+    /**
+     * The target type when associated with control actions.
+     */
+    protected static final int TYPE_CONTROL = 1;
+
+    /**
+     * The action name associated with the permission to call the
+     * <code>DaemonController.start()</code> method.
+     */
+    protected static final String CONTROL_START = "start";
+
+    /**
+     * The action name associated with the permission to call the
+     * <code>DaemonController.stop()</code> method.
+     */
+    protected static final String CONTROL_STOP = "stop";
+
+    /**
+     * The action name associated with the permission to call the
+     * <code>DaemonController.shutdown()</code> method.
+     */
+    protected static final String CONTROL_SHUTDOWN = "shutdown";
+
+    /**
+     * The action name associated with the permission to call the
+     * <code>DaemonController.reload()</code> method.
+     */
+    protected static final String CONTROL_RELOAD = "reload";
+
+    /**
+     * The action mask associated with the permission to call the
+     * <code>DaemonController.start()</code> method.
+     */
+    protected static final int MASK_CONTROL_START = 0x01;
+
+    /**
+     * The action mask associated with the permission to call the
+     * <code>DaemonController.stop()</code> method.
+     */
+    protected static final int MASK_CONTROL_STOP = 0x02;
+
+    /**
+     * The action mask associated with the permission to call the
+     * <code>DaemonController.shutdown()</code> method.
+     */
+    protected static final int MASK_CONTROL_SHUTDOWN = 0x04;
+
+    /**
+     * The action mask associated with the permission to call the
+     * <code>DaemonController.reload()</code> method.
+     */
+    protected static final int MASK_CONTROL_RELOAD = 0x08;
+
+    /**
+     * The &quot;wildcard&quot; action implying all actions for the given
+     * target name.
+     */
+    protected static final String WILDCARD = "*";
+
+    /* ====================================================================
+     * Instance variables
+     */
+
+    /** The type of this permission object. */
+    private transient int type = 0;
+    /** The permission mask associated with this permission object. */
+    private transient int mask = 0;
+    /** The String representation of this permission object. */
+    private transient String desc = null;
+
+    /* ====================================================================
+     * Constructors
+     */
+
+    /**
+     * Create a new <code>DaemonPermission</code> instance with a specified
+     * permission name.
+     * <p>
+     * This constructor will create a new <code>DaemonPermission</code>
+     * instance that <b>will not</b> grant any permission to the caller.
+     *
+     * @param target The target name of this permission.
+     * @exception IllegalArgumentException If the specified target name is not
+     *                supported.
+     */
+    public DaemonPermission(String target)
+        throws IllegalArgumentException
+    {
+        // Setup the target name of this permission object.
+        super(target);
+
+        // Check if the permission target name was specified
+        if (target == null)
+            throw new IllegalArgumentException("Null permission name");
+
+        // Check if this is a "control" permission and set up accordingly.
+        if (CONTROL.equalsIgnoreCase(target)) {
+            type = TYPE_CONTROL;
+            return;
+        }
+
+        // If we got here, we have an invalid permission name.
+        throw new IllegalArgumentException("Invalid permission name \"" +
+                                           target + "\" specified");
+    }
+
+    /**
+     * Create a new <code>DaemonPermission</code> instance with a specified
+     * permission name and a specified list of actions.
+     * <p>
+     * </p>
+     *
+     * @param target The target name of this permission.
+     * @param actions The list of actions permitted by this permission.
+     * @exception IllegalArgumentException If the specified target name is not
+     *                supported, or the specified list of actions includes an
+     *                invalid value.
+     */
+    public DaemonPermission(String target, String actions)
+        throws IllegalArgumentException
+    {
+        // Setup this instance's target name.
+        this(target);
+
+        // Create the appropriate mask if this is a control permission.
+        if (this.type == TYPE_CONTROL) {
+            this.mask = this.createControlMask(actions);
+            return;
+        }
+    }
+
+    /* ====================================================================
+     * Public methods
+     */
+
+    /**
+     * Return the list of actions permitted by this instance of
+     * <code>DaemonPermission</code> in its canonical form.
+     *
+     * @return The canonicalized list of actions.
+     */
+    public String getActions()
+    {
+        if (this.type == TYPE_CONTROL) {
+            return this.createControlActions(this.mask);
+        }
+        return "";
+    }
+
+    /**
+     * Return the hash code for this <code>DaemonPermission</code> instance.
+     *
+     * @return An hash code value.
+     */
+    public int hashCode()
+    {
+        this.setupDescription();
+        return this.desc.hashCode();
+    }
+
+    /**
+     * Check if a specified object equals <code>DaemonPermission</code>.
+     *
+     * @return <b>true</b> or <b>false</b> wether the specified object equals
+     *         this <code>DaemonPermission</code> instance or not.
+     */
+    public boolean equals(Object object)
+    {
+        if (object == this)
+            return true;
+
+        if (!(object instanceof DaemonPermission))
+            return false;
+
+        DaemonPermission that = (DaemonPermission) object;
+
+        if (this.type != that.type)
+            return false;
+        return this.mask == that.mask;
+    }
+
+    /**
+     * Check if this <code>DaemonPermission</code> implies another
+     * <code>Permission</code>.
+     *
+     * @return <b>true</b> or <b>false</b> wether the specified permission
+     *         is implied by this <code>DaemonPermission</code> instance or
+     *         not.
+     */
+    public boolean implies(Permission permission)
+    {
+        if (permission == this)
+            return true;
+
+        if (!(permission instanceof DaemonPermission))
+            return false;
+
+        DaemonPermission that = (DaemonPermission) permission;
+
+        if (this.type != that.type)
+            return false;
+        return (this.mask & that.mask) == that.mask;
+    }
+
+    /**
+     * Return a <code>String</code> representation of this instance.
+     *
+     * @return A <code>String</code> representing this
+     *         <code>DaemonPermission</code> instance.
+     */
+    public String toString()
+    {
+        this.setupDescription();
+        return this.desc;
+    }
+
+    /* ====================================================================
+     * Private methods
+     */
+
+    /** Create a String description for this permission instance.
+     */
+    private void setupDescription()
+    {
+        if (this.desc != null)
+            return;
+
+        StringBuffer buf = new StringBuffer();
+        buf.append(this.getClass().getName());
+        buf.append('[');
+        switch (this.type) {
+            case TYPE_CONTROL:
+                buf.append(CONTROL);
+            break;
+            default:
+                buf.append("UNKNOWN");
+            break;
+        }
+        buf.append(':');
+        buf.append(this.getActions());
+        buf.append(']');
+
+        this.desc = buf.toString();
+    }
+
+    /** Create a permission mask for a given control actions string.
+     */
+    private int createControlMask(String actions)
+        throws IllegalArgumentException
+    {
+        if (actions == null)
+            return 0;
+
+        int mask = 0;
+        StringTokenizer tok = new StringTokenizer(actions, ",", false);
+
+        while (tok.hasMoreTokens()) {
+            String val = tok.nextToken().trim();
+
+            if (WILDCARD.equals(val)) {
+                return MASK_CONTROL_START | MASK_CONTROL_STOP |
+                       MASK_CONTROL_SHUTDOWN | MASK_CONTROL_RELOAD;
+            }
+            else if (CONTROL_START.equalsIgnoreCase(val)) {
+                mask = mask | MASK_CONTROL_START;
+            }
+            else if (CONTROL_STOP.equalsIgnoreCase(val)) {
+                mask = mask | MASK_CONTROL_STOP;
+            }
+            else if (CONTROL_SHUTDOWN.equalsIgnoreCase(val)) {
+                mask = mask | MASK_CONTROL_SHUTDOWN;
+            }
+            else if (CONTROL_RELOAD.equalsIgnoreCase(val)) {
+                mask = mask | MASK_CONTROL_RELOAD;
+            }
+            else {
+                throw new IllegalArgumentException("Invalid action name \"" +
+                                                   val + "\" specified");
+            }
+        }
+        return mask;
+    }
+
+    /** Create a actions list for a given control permission mask. */
+    private String createControlActions(int mask)
+    {
+        StringBuffer buf = new StringBuffer();
+        boolean sep = false;
+
+        if ((mask & MASK_CONTROL_START) == MASK_CONTROL_START) {
+            sep = true;
+            buf.append(CONTROL_START);
+        }
+
+        if ((mask & MASK_CONTROL_STOP) == MASK_CONTROL_STOP) {
+            if (sep)
+                buf.append(",");
+            else
+                sep = true;
+            buf.append(CONTROL_STOP);
+        }
+
+        if ((mask & MASK_CONTROL_SHUTDOWN) == MASK_CONTROL_SHUTDOWN) {
+            if (sep)
+                buf.append(",");
+            else
+                sep = true;
+            buf.append(CONTROL_SHUTDOWN);
+        }
+
+        if ((mask & MASK_CONTROL_RELOAD) == MASK_CONTROL_RELOAD) {
+            if (sep)
+                buf.append(",");
+            else
+                sep = true;
+            buf.append(CONTROL_RELOAD);
+        }
+
+        return buf.toString();
+    }
+}
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/DaemonPermission.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/support/DaemonLoader.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/support/DaemonLoader.java?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/support/DaemonLoader.java (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/support/DaemonLoader.java Fri Jul 30 06:50:12 2010
@@ -0,0 +1,379 @@
+/*
+ *  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.
+ */
+
+package org.apache.commons.daemon.support;
+
+import org.apache.commons.daemon.DaemonContext;
+import org.apache.commons.daemon.DaemonController;
+
+import java.lang.reflect.Method;
+
+/*
+ * Used by jsvc for Daemon management.
+ *
+ * @version 1.0 <i>(SVN $Revision: 925053 $)</i>
+ */
+public final class DaemonLoader
+{
+
+    // N.B. These static mutable variables need to be accessed using synch.
+    private static Controller controller = null; //@GuardedBy("this")
+    private static Object daemon    = null; //@GuardedBy("this")
+    /* Methods to call */
+    private static Method init      = null; //@GuardedBy("this")
+    private static Method start     = null; //@GuardedBy("this")
+    private static Method stop      = null; //@GuardedBy("this")
+    private static Method destroy   = null; //@GuardedBy("this")
+
+    public static void version()
+    {
+        System.err.println("java version \"" +
+                           System.getProperty("java.version") + "\"");
+        System.err.println(System.getProperty("java.runtime.name") +
+                           " (build " +
+                           System.getProperty("java.runtime.version") + ")");
+        System.err.println(System.getProperty("java.vm.name") +
+                           " (build " +
+                           System.getProperty("java.vm.version") +
+                           ", " + System.getProperty("java.vm.info") + ")");
+    }
+
+    public static boolean check(String cn)
+    {
+        try {
+            /* Check the class name */
+            if (cn == null)
+                throw new NullPointerException("Null class name specified");
+
+            /* Get the ClassLoader loading this class */
+            ClassLoader cl = DaemonLoader.class.getClassLoader();
+            if (cl == null) {
+                System.err.println("Cannot retrieve ClassLoader instance");
+                return false;
+            }
+
+            /* Find the required class */
+            Class c = cl.loadClass(cn);
+
+            /* This should _never_ happen, but doublechecking doesn't harm */
+            if (c == null)
+                throw new ClassNotFoundException(cn);
+
+            /* Create a new instance of the daemon */
+            c.newInstance();
+
+        } catch (Throwable t) {
+            /* In case we encounter ANY error, we dump the stack trace and
+             * return false (load, start and stop won't be called).
+             */
+            t.printStackTrace(System.err);
+            return false;
+        }
+        /* The class was loaded and instantiated correctly, we can return
+         */
+        return true;
+    }
+
+    public static boolean load(String cn, String ar[])
+    {
+        try {
+            /* Make sure any previous instance is garbage collected */
+            System.gc();
+
+            /* Check if the underlying libray supplied a valid list of
+               arguments */
+            if (ar == null)
+                ar = new String[0];
+
+            /* Check the class name */
+            if (cn == null)
+                throw new NullPointerException("Null class name specified");
+
+            /* Get the ClassLoader loading this class */
+            ClassLoader cl = DaemonLoader.class.getClassLoader();
+            if (cl == null) {
+                System.err.println("Cannot retrieve ClassLoader instance");
+                return false;
+            }
+
+            /* Find the required class */
+            Class c = cl.loadClass(cn);
+
+            /* This should _never_ happen, but doublechecking doesn't harm */
+            if (c == null)
+                throw new ClassNotFoundException(cn);
+
+            /* Check interface */
+            boolean isdaemon = false;
+            try {
+                Class dclass =
+                    cl.loadClass("org.apache.commons.daemon.Daemon");
+                isdaemon = dclass.isAssignableFrom(c);
+            } catch (Exception cnfex) {
+                // Swallow if Daemon not found.
+            }
+
+            /* Check methods */
+            Class[]myclass = new Class[1];
+            if (isdaemon) {
+                myclass[0] = DaemonContext.class;
+            }
+            else {
+                myclass[0] = ar.getClass();
+            }
+
+            init    = c.getMethod("init", myclass);
+
+            myclass = null;
+            start   = c.getMethod("start", myclass);
+            stop    = c.getMethod("stop", myclass);
+            destroy = c.getMethod("destroy", myclass);
+
+            /* Create a new instance of the daemon */
+            daemon = c.newInstance();
+
+            if (isdaemon) {
+                /* Create a new controller instance */
+                controller = new Controller();
+
+                /* Set the availability flag in the controller */
+                controller.setAvailable(false);
+
+                /* Create context */
+                Context context = new Context();
+                context.setArguments(ar);
+                context.setController(controller);
+
+                /* Now we want to call the init method in the class */
+                Object arg[] = new Object[1];
+                arg[0] = context;
+                init.invoke(daemon, arg);
+            }
+            else {
+                Object arg[] = new Object[1];
+                arg[0] = ar;
+                init.invoke(daemon, arg);
+            }
+
+        } catch (Throwable t) {
+            /* In case we encounter ANY error, we dump the stack trace and
+             * return false (load, start and stop won't be called).
+             */
+            t.printStackTrace(System.err);
+            return false;
+        }
+        /* The class was loaded and instantiated correctly, we can return */
+        return true;
+    }
+
+    public static boolean start()
+    {
+        try {
+            /* Attempt to start the daemon */
+            Object arg[] = null;
+            start.invoke(daemon, arg);
+
+            /* Set the availability flag in the controller */
+            if (controller != null)
+                controller.setAvailable(true);
+
+        } catch (Throwable t) {
+            /* In case we encounter ANY error, we dump the stack trace and
+             * return false (load, start and stop won't be called).
+             */
+            t.printStackTrace(System.err);
+            return false;
+        }
+        return true;
+    }
+
+    public static boolean stop()
+    {
+        try {
+            /* Set the availability flag in the controller */
+            if (controller != null)
+                controller.setAvailable(false);
+
+            /* Attempt to stop the daemon */
+            Object arg[] = null;
+            stop.invoke(daemon, arg);
+
+            /* Run garbage collector */
+            System.gc();
+
+        }
+        catch (Throwable t) {
+            /* In case we encounter ANY error, we dump the stack trace and
+             * return false (load, start and stop won't be called).
+             */
+            t.printStackTrace(System.err);
+            return false;
+        }
+        return true;
+    }
+
+    public static boolean destroy()
+    {
+        try {
+            /* Attempt to stop the daemon */
+            Object arg[] = null;
+            destroy.invoke(daemon, arg);
+
+            /* Run garbage collector */
+            daemon = null;
+            controller = null;
+            System.gc();
+
+        } catch (Throwable t) {
+            /* In case we encounter ANY error, we dump the stack trace and
+             * return false (load, start and stop won't be called).
+             */
+            t.printStackTrace(System.err);
+            return false;
+        }
+        return true;
+    }
+
+    private static native void shutdown(boolean reload);
+    private static native void failed(String message);
+
+    public static class Controller
+        implements DaemonController
+    {
+
+        private boolean available = false;
+
+        private Controller()
+        {
+            super();
+            this.setAvailable(false);
+        }
+
+        private boolean isAvailable()
+        {
+            synchronized (this) {
+                return this.available;
+            }
+        }
+
+        private void setAvailable(boolean available)
+        {
+            synchronized (this) {
+                this.available = available;
+            }
+        }
+
+        public void shutdown()
+            throws IllegalStateException
+        {
+            synchronized (this) {
+                if (!this.isAvailable()) {
+                    throw new IllegalStateException();
+                }
+                else {
+                    this.setAvailable(false);
+                    DaemonLoader.shutdown(false);
+                }
+            }
+        }
+
+        public void reload()
+            throws IllegalStateException
+        {
+            synchronized (this) {
+                if (!this.isAvailable()) {
+                    throw new IllegalStateException();
+                }
+                else {
+                    this.setAvailable(false);
+                    DaemonLoader.shutdown(true);
+                }
+            }
+        }
+
+        public void fail()
+            throws IllegalStateException
+        {
+            fail(null, null);
+        }
+
+        public void fail(String message)
+            throws IllegalStateException
+        {
+            fail(message, null);
+        }
+
+        public void fail(Exception exception)
+            throws IllegalStateException
+        {
+            fail(null, exception);
+        }
+
+        public void fail(String message, Exception exception)
+            throws IllegalStateException
+        {
+            synchronized (this) {
+                if (!this.isAvailable()) {
+                    throw new IllegalStateException();
+                }
+                else {
+                    this.setAvailable(false);
+                    String msg = message;
+                    if (exception != null) {
+                        if (msg != null)
+                            msg = msg + ": " + exception.toString();
+                        else
+                            msg = exception.toString();
+                    }
+                    DaemonLoader.failed(msg);
+                }
+            }
+        }
+
+    }
+
+    public static class Context
+        implements DaemonContext
+    {
+
+        private DaemonController daemonController = null;
+
+        private String[] args = null;
+
+        public DaemonController getController()
+        {
+            return daemonController;
+        }
+
+        public void setController(DaemonController controller)
+        {
+            this.daemonController = controller;
+        }
+
+        public String[] getArguments()
+        {
+            return args;
+        }
+
+        public void setArguments(String[]args)
+        {
+            this.args = args;
+        }
+
+    }
+}
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/java/org/apache/commons/daemon/support/DaemonLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/media/logo.xcf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/Makefile
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/Makefile?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/Makefile (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/Makefile Fri Jul 30 06:50:12 2010
@@ -0,0 +1,22 @@
+#
+#  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.
+#
+all:
+	(cd service; make)
+	(cd moni; make)
+clean:
+	(cd service; make clean)
+	(cd moni; make clean)

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/Makefile
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/README
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/README?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/README (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/README Fri Jul 30 06:50:12 2010
@@ -0,0 +1,90 @@
+(Please have a look to procrun (subdirectory), procrun is
+probably what you have to use).
+
+Note: MAKE SURE you first build the java part (using Ant) otherwise the dist
+directory is not created).
+
+To build the service utilities for windows you will need:
+- MS Visual C++ (I have used version 5.0).
+- CYGWIN to build the jsvc.exe.
+- A Java Platform 2 compliant SDK to run the service.
+
+The Windows 'procrun' applications are found in:
+
+procrun/apps/prunmgr
+procrun/apps/prunsrv
+
+The common source files are in
+
+procrun/src
+procrun/include
+procrun/resources
+
+The Makefiles in the apps/ directories can be used with MS Visual C++ 5.0.
+They will not work with earlier versions of nmake
+
+Note that later versions of Visual C++ can be set up to build the applications,
+however they may generate executables linked with a later version of the MS "C"
+runtime library (MSVCRTL), and may not work properly with all versions of Java.
+
+========================
+
+Note: the rest of this file is outdated
+
+Structure of the utilies:
+- bin: exe files.
+- executables/vdmoniadm: project files for the desktop program.
+- executables/vdmonisvc: project files for the sevice wrapper.
+- lib: contains the common include file.
+- moni: contains sources of the vdmoniadm and vdmonisvc.
+- service: contains the sources and the project for the test installer.
+- signals: contains the kill() emulation logic.
+- supcalls_nt: contains the environment emulation logic.
+
+How to use it:
+1 - Build the jsvc.exe (See jakarta-tomcat-4.0/service).
+  It produces:
+  - service.jar
+  - jsvc.exe
+
+2- Create the following directories:
+  c:\home\jakarta\bin
+  c:\home\jakarta\lib
+
+3 - Copy
+  From jakarta-tomcat-4.0/service:
+  service.jar to lib
+  jsvc.exe to bin
+  From winnt:
+  INSTSVC.exe to bin
+  vdmoniadm.exe to bin
+  vdmonisvc to bin.
+
+4 - In a MSDOS windows run INSTSVC
+  It creates all informations to start the service.
+    The service is not started automaticly use control_panel+service and
+    and make it automatic after testing it starts and stops correctly.
+
+  It creates the registry values needed for the environment to start jsvc.exe
+    JAKARTA_HOME
+    CYGWIN (You have to set it to your cygwin directory home).
+    JAVA_HOME (You have to set it to your JAVA_HOME directory).
+    HOSTNAME (not yet used)
+    HOSTPORT (not yet used)
+  I use regedit to modify these values.
+
+5 - Using the explorer go to profiles/allusers/program/startup and add a link
+  to vdmoniadm.exe.
+
+6 - Reboot the machine and logon.
+  You should see a "nice" icon in the System Task-bar indicating that the 
+  Java service is running. A right click on the icon calls a small menu.
+  Restart: (not yet implemented).
+  Configure: (not yet implemented).
+  Stop: Stops the java service.
+
+It is still a work in progress and blabla...
+
+Have fun...
+
+ Jean-Frederic <jfrederic.clere AT fujitsu-siemens.com>

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

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/icon1.ico
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/icon1.ico?rev=980662&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/icon1.ico
------------------------------------------------------------------------------
    svn:mime-type = image/x-icon

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/resource.h
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/resource.h?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/resource.h (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/resource.h 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: resource.h 480469 2006-11-29 08:22:04Z bayard $ */
+/* Used by vdmoniadm.rc */
+#define NO_ACCESS                       1
+#define NO_ACCESS_MONI                  2
+#define ALREADY_STOP                    3
+#define ERROR_STATUS                    4
+#define ALREADY_START                   5
+#define CANNOT_START                    6
+#define ID_TASKICON                     7
+#define CANNOT_START_VDCOM              7
+#define CANNOT_START_VDCONF             8
+#define ID_STOP_VDMONI                  40002
+#define ID_PROPRETY                     40003
+#define ID_START_VDCOM                  40008
+
+/* Next default values for new objects */
+
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        103
+#define _APS_NEXT_COMMAND_VALUE         40009
+#define _APS_NEXT_CONTROL_VALUE         1000
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/resource.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsp
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsp?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsp (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsp Fri Jul 30 06:50:12 2010
@@ -0,0 +1,121 @@
+# Microsoft Developer Studio Project File - Name="vdmoniadm" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=vdmoniadm - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "vdmoniadm.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "vdmoniadm.mak" CFG="vdmoniadm - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "vdmoniadm - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "vdmoniadm - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "vdmoniadm - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "." /I "../../lib" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 oldnames.lib msvcrt.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib /out:"../../bin/vdmoniadm.exe"
+
+!ELSEIF  "$(CFG)" == "vdmoniadm - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "." /I "../../lib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 oldnames.lib msvcrt.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib /out:"../../bin/vdmoniadm.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "vdmoniadm - Win32 Release"
+# Name "vdmoniadm - Win32 Debug"
+# Begin Group "moni"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\moni\vdmoniadm.c
+# End Source File
+# End Group
+# Begin Group "lib"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\lib\moni_inst.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\icon1.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\vdmoniadm.rc
+
+!IF  "$(CFG)" == "vdmoniadm - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "vdmoniadm - Win32 Debug"
+
+!ENDIF 
+
+# End Source File
+# End Target
+# End Project

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsp
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsw
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsw?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsw (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsw Fri Jul 30 06:50:12 2010
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "vdmoniadm"=.\vdmoniadm.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.dsw
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.rc
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.rc?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.rc (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmoniadm/vdmoniadm.rc Fri Jul 30 06:50:12 2010
@@ -0,0 +1,344 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// German (Germany) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
+#ifdef _WIN32
+LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+STOPYESNO DIALOG DISCARDABLE  0, 0, 186, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "OnServe-Monitor"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,113,55,50,14
+    PUSHBUTTON      "Abbrechen",IDCANCEL,19,56,50,14
+    LTEXT           "Sind Sie sicher, daß Sie den OnServe-Monitor beenden wollen?",
+                    IDC_STATIC,31,17,120,26
+END
+
+STARTYESNO DIALOG DISCARDABLE  0, 0, 186, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "OnServe-Monitor"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "Abbrechen",IDCANCEL,71,54,50,14
+    LTEXT           "Der OnServe-Monitor wird gestartet. Bitte warten...",
+                    IDC_STATIC,31,17,120,26
+END
+
+PLEASEWAIT DIALOG DISCARDABLE  0, 0, 186, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "OnServe-Monitor"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "Abbrechen",IDCANCEL,71,54,50,14
+    LTEXT           "Der OnServe Monitor wird beendet. Bitte warten...",
+                    IDC_STATIC,31,17,120,26
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    "STOPYESNO", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+
+    "STARTYESNO", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+
+    "PLEASEWAIT", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+MENU MENU DISCARDABLE 
+BEGIN
+    POPUP "no display"
+    BEGIN
+        MENUITEM "Online-Monitor Kommandos.",   ID_START_VDCOM
+        MENUITEM "OnServe Konfigurieren.",      ID_PROPRETY
+        MENUITEM "Online-Monitor stoppen.",     ID_STOP_VDMONI
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE 
+BEGIN
+    NO_ACCESS               "Mit dieser Kennung dürfen Sie OnServe nicht beenden."
+    NO_ACCESS_MONI          "Der Dienst kann nicht erreicht werden!"
+    ALREADY_STOP            "Der OnServe-Monitor ist nicht gestartet."
+    ERROR_STATUS            "Der Zustand des Dienstes kann nicht ermittelt werden."
+    ALREADY_START           "Der OnServe-Monitor ist bereits gestartet."
+    CANNOT_START            "Der OnServe-Monitor kann nicht gestartet werden."
+    CANNOT_START_VDCOM      "Das Kommando-Programm des OnServe-Monitors kann nicht gestartet werden."
+    CANNOT_START_VDCONF     "Das OnServe-Konfigurationsprogramm kann nicht gestartet werden."
+END
+
+#endif    // German (Germany) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+STARTYESNO DIALOG DISCARDABLE  0, 0, 186, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "OnServe Monitor"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "Cancel",IDCANCEL,71,54,50,14
+    LTEXT           "The OnServe Monitor is being started. Please Wait....",
+                    IDC_STATIC,31,17,120,26
+END
+
+STOPYESNO DIALOG DISCARDABLE  0, 0, 186, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "OnServe Monitor"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,113,55,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,19,56,50,14
+    LTEXT           "Are you sure you want to stop the OnServe Monitor?",
+                    IDC_STATIC,31,17,120,26
+END
+
+PLEASEWAIT DIALOG DISCARDABLE  0, 0, 186, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
+    WS_SYSMENU
+CAPTION "OnServe Monitor"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "Cancel",IDCANCEL,71,54,50,14
+    LTEXT           "The OnServe Monitor is being stopped. Please Wait....",
+                    IDC_STATIC,31,17,120,26
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    "STARTYESNO", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+
+    "STOPYESNO", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+
+    "PLEASEWAIT", DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 88
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+MENU MENU DISCARDABLE 
+BEGIN
+    POPUP "no display"
+    BEGIN
+        MENUITEM "Restart Jakarta service",     ID_START_VDCOM
+        MENUITEM "Configure Jakarta service",   ID_PROPRETY
+        MENUITEM "Stop Jakarta service",        ID_STOP_VDMONI
+    END
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+ONSERVE                 ICON    DISCARDABLE     "icon1.ico"
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "Siemens AG\0"
+            VALUE "FileDescription", "OnServe Service Administration..\0"
+            VALUE "FileVersion", "3.0.0.1\0"
+            VALUE "InternalName", "vdmoniadm\0"
+            VALUE "LegalCopyright", "Copyright © 1998-2001, Apache Software Foundation \0"
+            VALUE "OriginalFilename", "vdmonisvc.exe\0"
+            VALUE "ProductName", "OnServe\0"
+            VALUE "ProductVersion", "3.0 A00\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // !_MAC
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE 
+BEGIN
+    NO_ACCESS               "Your login does not allow you to stop OnServe."
+    NO_ACCESS_MONI          "Cannot access to the service!"
+    ALREADY_STOP            "OnServe Monitor is not running."
+    ERROR_STATUS            "Cannot get the status of the service."
+    ALREADY_START           "OnServe Monitor is already started."
+    CANNOT_START            "Cannot start the OnServe Monitor."
+    CANNOT_START_VDCOM      "Cannot start the OnServe monitor commands program."
+    CANNOT_START_VDCONF     "Cannot start the OnServe Configuration program."
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/resource.h
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/resource.h?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/resource.h (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/resource.h Fri Jul 30 06:50:12 2010
@@ -0,0 +1,29 @@
+/*
+ *  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: resource.h 480469 2006-11-29 08:22:04Z bayard $ */
+/* Used by vdmonisvc.rc */
+
+/* Next default values for new objects */
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        105
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1004
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/resource.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsp
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsp?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsp (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsp Fri Jul 30 06:50:12 2010
@@ -0,0 +1,122 @@
+# Microsoft Developer Studio Project File - Name="vdmonisvc" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=vdmonisvc - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "vdmonisvc.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "vdmonisvc.mak" CFG="vdmonisvc - Win32 Release"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "vdmonisvc - Win32 Release" (based on\
+ "Win32 (x86) Console Application")
+!MESSAGE "vdmonisvc - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "vdmonisvc - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\vdmonisvc"
+# PROP BASE Intermediate_Dir ".\vdmonisvc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "WINPC" /FR /YX /FD /c
+# ADD BASE RSC /l 0x407 /d "NDEBUG"
+# ADD RSC /l 0x407 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib gdi32.lib user32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib msvcrt.lib oldnames.lib /nologo /subsystem:console /machine:I386 /nodefaultlib /out:"../../bin/vdmonisvc.exe"
+
+!ELSEIF  "$(CFG)" == "vdmonisvc - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\CleanSv0"
+# PROP BASE Intermediate_Dir ".\CleanSv0"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /Gm /GX /Zi /Od /I "../../lib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "WINPC" /FR /YX /FD /c
+# ADD BASE RSC /l 0x407 /d "_DEBUG"
+# ADD RSC /l 0x407 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 user32.lib oldnames.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib msvcrt.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib /out:"../../bin/vdmonisvc.exe"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "vdmonisvc - Win32 Release"
+# Name "vdmonisvc - Win32 Debug"
+# Begin Group "supcalls_nt"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\supcalls_nt\vdenv.c
+# End Source File
+# End Group
+# Begin Group "signals"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\signals\kills.c
+# End Source File
+# End Group
+# Begin Group "moni"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\moni\vdmonisvc.c
+# End Source File
+# End Group
+# Begin Group "moni_nt"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\moni_nt\service.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\vdmonisvc.rc
+# End Source File
+# End Target
+# End Project

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsp
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsw
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsw?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsw (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsw Fri Jul 30 06:50:12 2010
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "vdmonisvc"=.\vdmonisvc.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+

Propchange: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.dsw
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Added: commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.rc
URL: http://svn.apache.org/viewvc/commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.rc?rev=980662&view=auto
==============================================================================
--- commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.rc (added)
+++ commons/proper/daemon/tags/COMMONS_DAEMON_1_0_3_RC3/src/native/nt/executables/vdmonisvc/vdmonisvc.rc Fri Jul 30 06:50:12 2010
@@ -0,0 +1,105 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "Siemens AG\0"
+            VALUE "FileDescription", "OnServe Service application.\0"
+            VALUE "FileVersion", "3.0.0.1\0"
+            VALUE "InternalName", "vdmonisvc\0"
+            VALUE "LegalCopyright", "Copyright © 1998-2001, Apache Software Foundation.\0"
+            VALUE "OriginalFilename", "vdmonisvc.exe\0"
+            VALUE "ProductName", "OnServe\0"
+            VALUE "ProductVersion", "3.0 A00\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
+
+#endif    // !_MAC
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+



Mime
View raw message