geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r728200 - in /geronimo/server/trunk/plugins: ./ procrun/ procrun/src/ procrun/src/main/ procrun/src/main/history/ procrun/src/main/plan/ procrun/src/main/resources/ procrun/src/main/resources/bin/
Date Sat, 20 Dec 2008 00:48:20 GMT
Author: gawor
Date: Fri Dec 19 16:48:20 2008
New Revision: 728200

URL: http://svn.apache.org/viewvc?rev=728200&view=rev
Log:
Windows service wrapper for Geronimo. Based on patch from Jack Cai (GERONIMO-4394)

Added:
    geronimo/server/trunk/plugins/procrun/
    geronimo/server/trunk/plugins/procrun/pom.xml   (with props)
    geronimo/server/trunk/plugins/procrun/src/
    geronimo/server/trunk/plugins/procrun/src/main/
    geronimo/server/trunk/plugins/procrun/src/main/history/
    geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml   (with props)
    geronimo/server/trunk/plugins/procrun/src/main/plan/
    geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml   (with props)
    geronimo/server/trunk/plugins/procrun/src/main/resources/
    geronimo/server/trunk/plugins/procrun/src/main/resources/bin/
    geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrv.exe   (with props)
    geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrvw.exe   (with
props)
    geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat   (with props)
Modified:
    geronimo/server/trunk/plugins/pom.xml

Modified: geronimo/server/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/pom.xml?rev=728200&r1=728199&r2=728200&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/pom.xml (original)
+++ geronimo/server/trunk/plugins/pom.xml Fri Dec 19 16:48:20 2008
@@ -88,8 +88,9 @@
         <module>sharedlib</module>
         <module>welcome</module>
         <module>concurrent</module>
-    <module>classloaders</module>
-  </modules>
+        <module>classloaders</module>
+        <module>procrun</module>
+    </modules>
     
     <build>
         <plugins>

Added: geronimo/server/trunk/plugins/procrun/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/procrun/pom.xml?rev=728200&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/procrun/pom.xml (added)
+++ geronimo/server/trunk/plugins/procrun/pom.xml Fri Dec 19 16:48:20 2008
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.plugins</groupId>
+        <artifactId>plugins</artifactId>
+        <version>2.2-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.configs</groupId>
+    <artifactId>procrun</artifactId>
+    <name>Geronimo Plugins, Windows Service Wrapper</name>
+    <packaging>car</packaging>
+
+    <description>
+        Provides a Windows service wrapper with Apache Commons Daemon procrun for Geronimo.
+    </description>
+
+    <dependencies/>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.geronimo.buildsupport</groupId>
+                <artifactId>car-maven-plugin</artifactId>
+                <configuration>
+                    <useMavenDependencies>
+                        <value>true</value>
+                        <includeVersion>true</includeVersion>
+                    </useMavenDependencies>
+                    <category>Plugins</category>
+                    <instance>
+                        <plugin-artifact>
+                            <module-id>
+                                <type>car</type>
+                            </module-id>
+                            <copy-file relative-to="geronimo" dest-dir="bin">bin/</copy-file>
+                        </plugin-artifact>
+                    </instance>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: geronimo/server/trunk/plugins/procrun/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/procrun/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/procrun/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml?rev=728200&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml (added)
+++ geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml Fri Dec 19 16:48:20
2008
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<plugin-artifact xmlns:ns2="http://geronimo.apache.org/xml/ns/attributes-1.2" xmlns="http://geronimo.apache.org/xml/ns/plugins-1.3">
+    <module-id>
+        <groupId>org.apache.geronimo.configs</groupId>
+        <artifactId>procrun</artifactId>
+        <version>2.2-SNAPSHOT</version>
+        <type>car</type>
+    </module-id>
+</plugin-artifact>

Propchange: geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/procrun/src/main/history/dependencies.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml?rev=728200&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml (added)
+++ geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml Fri Dec 19 16:48:20 2008
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--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.-->
+<!--$Rev$ $Date$-->
+<module xmlns="http://geronimo.apache.org/xml/ns/deployment-${geronimoSchemaVersion}">
+
+</module>

Propchange: geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/procrun/src/main/plan/plan.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrv.exe
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrv.exe?rev=728200&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrv.exe
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrv.exe
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrvw.exe
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrvw.exe?rev=728200&view=auto
==============================================================================
Binary file - no diff available.

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrvw.exe
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/geronimosrvw.exe
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat?rev=728200&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat (added)
+++ geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat Fri Dec 19
16:48:20 2008
@@ -0,0 +1,238 @@
+@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 ---------------------------------------------------------------------------
+@REM Windows Service Install/Uninstall batch file based on procrun for Geronimo
+@REM
+@REM You should not have to edit this file.  If you wish to have environment
+@REM variables set each time you run this batch file refer to the information
+@REM on the setenv.bat file.
+@REM
+@REM
+@REM Invocation Syntax:
+@REM
+@REM   service_pr command [stop args]
+@REM
+@REM Commands
+@REM   install      Install the service of the name "geronimosrv".
+@REM   remove       Remove the service "geronimosrv" from the System.
+@REM
+@REM For detailed usage information, just run service_pr.bat without any
+@REM arguments.
+@REM
+@REM Environment Variable Prequisites:
+@REM
+@REM   GERONIMO_HOME   May point at your Geronimo top-level directory.
+@REM                   If not specified, this batch file will attempt to
+@REM                   discover it relative to the location of this file.
+@REM
+@REM   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
+@REM                   the JVM should use (java.io.tmpdir).  Defaults to
+@REM                   var\temp (resolved to server instance directory).
+@REM
+@REM   JAVA_HOME       Points to your Java Development Kit installation.
+@REM                   JAVA_HOME doesn't need to be set if JRE_HOME is set
+@REM                   unless you use the "debug" command.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM   JRE_HOME        (Optional) Points to your Java Runtime Environment
+@REM                   Set this if you wish to run Geronimo using the JRE
+@REM                   instead of the JDK.
+@REM                   Defaults to JAVA_HOME if empty.
+@REM                   It is mandatory either JAVA_HOME or JRE_HOME are set.
+@REM
+@REM Troubleshooting execution of this batch file:
+@REM
+@REM   GERONIMO_BATCH_ECHO (Optional) Environment variable that when set to
+@REM                       "on" results in batch commands being echoed.
+@REM
+@REM   GERONIMO_BATCH_PAUSE (Optional) Environment variable that when set to
+@REM                        "on" results in each batch file to pause at the
+@REM                        end of execution
+@REM
+@REM   GERONIMO_ENV_INFO    (Optional) Environment variable that when set to
+@REM                        "on" (the default) outputs the values of
+@REM                        GERONIMO_HOME, GERONIMO_TMPDIR,
+@REM                        JAVA_RUNTIME before the command is
+@REM                        issued. Set to "off" if you do not want this
+@REM                        information displayed.
+@REM
+@REM Batch files called by this batch file:
+@REM
+@REM   %GERONIMO_HOME%\bin\setenv.bat
+@REM                   (Optional) This batch file is called if it is present.
+@REM                   Its contents may set one or more of the above environment
+@REM                   variables. It is preferable (to simplify migration to
+@REM                   future Geronimo releases) to set environment variables
+@REM                   in this file rather than modifying Geronimo's script files.
+@REM
+@REM   %GERONIMO_HOME%\bin\setjavaenv.bat
+@REM                   This batch file is called to set environment variables
+@REM                   relating to the java or jdb exe file to call.
+@REM                   This file should not need to be modified.
+@REM
+@REM Exit Codes:
+@REM
+@REM  0 - Success
+@REM  1 - Error
+@REM ---------------------------------------------------------------------------
+
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+if "%OS%" == "Windows_NT" goto okOsCheck
+echo Cannot process Geronimo command - you are running an unsupported operating system.
+set ERRORLEVEL=1
+goto end
+
+:okOsCheck
+@setlocal enableextensions
+@set ERRORLEVEL=0
+
+if not "%GERONIMO_HOME%" == "" goto resolveHome
+@REM %~dp0 is expanded pathname of the current script
+set GERONIMO_HOME=%~dp0..
+
+@REM resolve .. and remove any trailing slashes
+:resolveHome
+set CURRENT_DIR=%cd%
+cd /d %GERONIMO_HOME%
+set GERONIMO_HOME=%cd%
+cd /d %CURRENT_DIR%
+
+:gotHome
+if exist "%GERONIMO_HOME%\bin\geronimo.bat" goto okHome
+echo The GERONIMO_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+set ERRORLEVEL=1
+goto end
+:okHome
+
+@REM Get standard environment variables
+@REM Users can optionally create this file to set environment variables.
+if exist "%GERONIMO_HOME%\bin\setenv.bat" call "%GERONIMO_HOME%\bin\setenv.bat"
+if not %errorlevel% == 0 goto end
+
+@REM Get standard Java environment variables (based upon Tomcat's setclasspath.bat
+@REM but renamed since Geronimo's classpath is set in the JAR manifest)
+if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv
+echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat
+echo This file is needed to run this program
+set ERRORLEVEL=1
+goto end
+:okSetJavaEnv
+set BASEDIR=%GERONIMO_HOME%
+call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+if not %errorlevel% == 0 goto end
+
+if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
+@REM A relative value will be resolved relative to each instance 
+set GERONIMO_TMPDIR=var\temp
+:gotTmpdir
+
+set EXECUTABLE=%GERONIMO_HOME%\bin\geronimosrv.exe
+set JAVA_EXE=%_RUNJAVA%.exe
+
+if "%1" == "" goto showUsage
+set SERVICE_NAME=geronimosrv
+
+if ""%1"" == ""install"" goto doInstall
+if ""%1"" == ""remove"" goto doRemove
+
+:showUsage
+echo.
+echo Usage:  service_pr command [stop args]
+echo.
+echo Commands:
+echo   install     Install the Geronimo service with the service name "geronimosrv"
+echo   remove      Uninstall the Geronimo service "geronimosrv"
+echo.
+echo Optional stop args are used when stopping the service.
+echo Specify all necessary args or specify none of them.
+echo   --user      Admin user, default to "system"
+echo   --password  Admin password, default to "manager"
+echo   --port      RMI port to connect to, default to 1099
+echo   --secure    Optional flag for enabling secure JMX communication
+goto end
+
+:doRemove
+@REM Remove the service
+"%EXECUTABLE%" //DS//%SERVICE_NAME%
+if not errorlevel 1 goto removed
+echo Failed to remove "%SERVICE_NAME%" service.
+goto end
+
+:removed
+echo The service '%SERVICE_NAME%' has been removed.
+goto end
+
+:doInstall
+@REM ----- Install the service ---------------------------------------
+@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
+echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
+echo Using JRE_HOME:        %JRE_HOME%
+:skipEnvInfo
+
+@REM Set default startup arguments
+set STARTUP_ARGS=--long
+
+@REM Get remaining unshifted shutdown command line arguments
+if "%2" == "" goto setDefaultArgs
+set SHUTDOWN_ARGS="%2"
+:setArgs
+shift
+if "%2"=="" goto doneSetArgs
+set SHUTDOWN_ARGS=%SHUTDOWN_ARGS%#%2
+goto setArgs
+:setDefaultArgs
+set SHUTDOWN_ARGS=--user#system#--password#manager
+:doneSetArgs
+
+@REM Setup the Java programming language agent
+set JAVA_AGENT_JAR=%GERONIMO_HOME%\bin\jpa.jar
+set JAVA_AGENT_OPTS=
+if exist "%JAVA_AGENT_JAR%" set JAVA_AGENT_OPTS=-javaagent:^"%JAVA_AGENT_JAR%^"
+
+set PR_DISPLAYNAME=Apache Geronimo Service - %SERVICE_NAME%
+set PR_DESCRIPTION=Apache Geronimo Server - http://geronimo.apache.org/
+set PR_INSTALL=%EXECUTABLE%
+set PR_LOGPATH=%GERONIMO_HOME%\var\log
+set PR_LOGLEVEL=INFO
+set PR_LOGPREFIX=geronimosrv.log
+set PR_STDOUTPUT=%PR_LOGPATH%\geronimosrv.out
+set PR_STDERROR=%PR_LOGPATH%\geronimosrv.err
+
+"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartImage %JAVA_EXE% --StartPath "%GERONIMO_HOME%"
--StartMode exe --StartParams %JAVA_AGENT_OPTS%#-Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed';'%JRE_HOME%\lib\endorsed"#-Djava.ext.dirs="%GERONIMO_HOME%\lib\ext';'%JRE_HOME%\lib\ext"#-Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"#-Djava.io.tmpdir="%GERONIMO_TMPDIR%"#-jar#"%GERONIMO_HOME%\bin\server.jar"#%STARTUP_ARGS%
--StopImage %JAVA_EXE% --StopPath "%GERONIMO_HOME%" --StopMode exe --StopParams %JAVA_AGENT_OPTS%#-Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed';'%JRE_HOME%\lib\endorsed"#-Djava.ext.dirs="%GERONIMO_HOME%\lib\ext';'%JRE_HOME%\lib\ext"#-Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"#-Djava.io.tmpdir="%GERONIMO_TMPDIR%"#-jar#"%GERONIMO_HOME%\bin\shutdown.jar"#%SHUTDOWN_ARGS%
+if not errorlevel 1 goto installed
+echo Failed to install "%SERVICE_NAME%" service.
+goto end
+
+:installed
+echo The service "%SERVICE_NAME%" has been installed.
+
+:end
+@REM Clear the environment variables. They are not needed any more.
+set PR_DISPLAYNAME=
+set PR_DESCRIPTION=
+set PR_INSTALL=
+set PR_LOGPATH=
+set PR_LOGLEVEL=
+set PR_LOGPREFIX=
+set PR_STDOUTPUT=
+set PR_STDERROR=
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause
+@endlocal

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat
------------------------------------------------------------------------------
    svn:executable = *

Propchange: geronimo/server/trunk/plugins/procrun/src/main/resources/bin/service_pr.bat
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message