commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r925349 - in /commons/proper/daemon/trunk/src/samples: ProcrunService.cmd README.txt
Date Fri, 19 Mar 2010 17:36:43 GMT
Author: sebb
Date: Fri Mar 19 17:36:43 2010
New Revision: 925349

URL: http://svn.apache.org/viewvc?rev=925349&view=rev
Log:
Sample script to start ProcrunService
Update readme with its details

Added:
    commons/proper/daemon/trunk/src/samples/ProcrunService.cmd   (with props)
Modified:
    commons/proper/daemon/trunk/src/samples/README.txt

Added: commons/proper/daemon/trunk/src/samples/ProcrunService.cmd
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/samples/ProcrunService.cmd?rev=925349&view=auto
==============================================================================
--- commons/proper/daemon/trunk/src/samples/ProcrunService.cmd (added)
+++ commons/proper/daemon/trunk/src/samples/ProcrunService.cmd Fri Mar 19 17:36:43 2010
@@ -0,0 +1,45 @@
+@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
+
+rem Copy this file and ProcrunService.jar into the same directory as prunsrv (or adjust the
paths below)
+
+setlocal
+
+rem The service name (make sure it does not clash with an existing service)
+set SERVICE=ProcrunService
+
+rem my location
+set MYPATH=%~dp0
+
+rem location of Prunsrv
+set PATH_PRUNSRV=%MYPATH%
+
+rem location of jarfile
+set PATH_JAR=%MYPATH%
+
+set PRUNSRV=%PATH_PRUNSRV%prunsrv
+echo Installing %SERVICE% if necessary
+%PRUNSRV% //IS//%SERVICE% --Install %PATH_PRUNSRV%prunsrv.exe
+
+echo Setting the parameters for %SERVICE%
+%PRUNSRV% //US//%SERVICE% --Jvm=auto --StdOutput auto --StdError auto ^
+--Classpath=%PATH_JAR%ProcrunService.jar ^
+--StartMode=jvm --StopMode=jvm --StartClass=ProcrunService --StartParams=start --StopClass=ProcrunService
+
+echo Installation of %SERVICE% is complete
\ No newline at end of file

Propchange: commons/proper/daemon/trunk/src/samples/ProcrunService.cmd
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Modified: commons/proper/daemon/trunk/src/samples/README.txt
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/samples/README.txt?rev=925349&r1=925348&r2=925349&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/samples/README.txt (original)
+++ commons/proper/daemon/trunk/src/samples/README.txt Fri Mar 19 17:36:43 2010
@@ -2,7 +2,8 @@ The directory contains examples of Java 
 The examples are compiled using Ant (just type ant). Each example creates a
 jar file in ../../dist
 
-SimpleDaemon:
+SimpleDaemon
+------------
 
 SimpleDaemon demonstrates the feature of the daemon offered by
 Apache Commons Daemon.
@@ -10,7 +11,8 @@ To run it adapt the SimpleDaemon.sh file
 telnet localhost 1200
 Additional information in ../native/unix/INSTALL.txt
 
-ServiceDaemon:
+ServiceDaemon
+-------------
 
 ServiceDaemon allows to start programs using the Commons Daemon.
 
@@ -35,6 +37,12 @@ socks5=/usr/local/bin/socks5 -f
 
 To run it adapt the ServiceDaemon.sh file.
 
-AloneService:
+AloneService
+------------
 
 AloneService is like ServiceDaemon except it does not use the Daemon interface.
+
+ProcrunService
+--------------
+This is a simple Windows Service application.
+See ProcrunService.cmd for a sample installation script.
\ No newline at end of file



Mime
View raw message