You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by xi...@apache.org on 2012/02/20 14:55:48 UTC

svn commit: r1291259 - in /geronimo/server/branches/3.0-beta: framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/ framework/configs/karaf-framework/src/main/distribution/windows-text/bin/ plugins/jaxws/jaxws-tools/src/main/resources...

Author: xiaming
Date: Mon Feb 20 13:55:47 2012
New Revision: 1291259

URL: http://svn.apache.org/viewvc?rev=1291259&view=rev
Log:
GERONIMO-6275 Add GERONIMO_SERVER env variable into scripts, patch provided by Russell and updated by Forrest

Added:
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat
Modified:
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
    geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/internalLauncher.bat
    geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.bat
    geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.sh
    geronimo/server/branches/3.0-beta/plugins/procrun/src/main/resources/bin/service_pr.bat

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client Mon Feb 20 13:55:47 2012
@@ -38,12 +38,19 @@
 #   GERONIMO_HOME   (Optional) May point at your Geronimo top-level directory.
 #                   If not specified, it will default to the parent directory
 #                   of the location of this script.
+#                   The HOME directory holds the binary install of Geronimo.
+#
+#   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+#                   top-level directory. If not specified, it will default to
+#                   $GERONIMO_HOME.
+#                   The SERVER directory holds the configuration and data for 
+#                   a Geronimo instance.
 #
 #   GERONIMO_OPTS   (Optional) Java runtime options.
 #
 #   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir). Defaults to var/temp
-#                   (resolved to server instance directory).
+#                   (resolved to server instance directory GERONIMO_SERVER).
 #
 #   JAVA_HOME       Points to your Java Development Kit installation.
 #                   JAVA_HOME doesn't need to be set if JRE_HOME is set.
@@ -85,16 +92,6 @@
 #  1 - Error
 # -----------------------------------------------------------------------------
 
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-darwin=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-Darwin*) darwin=true;;
-esac
-
 # resolve links - $0 may be a softlink
 PRG="$0"
 
@@ -114,15 +111,25 @@ PRGDIR=`dirname "$PRG"`
 # Only set GERONIMO_HOME if not already set
 [ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`
 
-if [ -r "$GERONIMO_HOME"/bin/setenv.sh ]; then
+if [ -f "$GERONIMO_HOME"/bin/setenv.sh ]; then
   . "$GERONIMO_HOME"/bin/setenv.sh
 fi
 
+if [ -f "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
+    BASEDIR="$GERONIMO_HOME"
+    . "$GERONIMO_HOME"/bin/setjavaenv.sh
+else
+    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
+    echo "This file is needed to run this program"
+    exit 1
+fi
+
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
   [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
+  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
 fi
 
 # For OS400
@@ -137,32 +144,6 @@ if $os400; then
   export QIBM_MULTI_THREADED=Y
 fi
 
-# Get standard Java environment variables
-# (based upon Tomcat's setclasspath.sh but renamed since Geronimo's classpath 
-# is set in the JAR manifest)
-if $os400; then
-  # -r will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  BASEDIR="$GERONIMO_HOME"
-  . "$GERONIMO_HOME"/bin/setjavaenv.sh 
-else
-  if [ -r "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
-    BASEDIR="$GERONIMO_HOME"
-    . "$GERONIMO_HOME"/bin/setjavaenv.sh
-  else
-    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-if [ -z "$GERONIMO_TMPDIR" ] ; then
-  # Define the java.io.tmpdir to use for Geronimo
-  GERONIMO_TMPDIR=var/temp
-fi
-
 # Classpath: Add the jars in the lib dir
 for file in "$GERONIMO_HOME"/lib/*.jar
 do
@@ -185,6 +166,7 @@ if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
   JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
   GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
+  GERONIMO_SERVER=`cygpath --absolute --windows "$GERONIMO_SERVER"`
   GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
   EXT_DIRS=`cygpath --path --windows "$EXT_DIRS"`
@@ -194,6 +176,7 @@ fi
 # ----- Execute The Requested Command -----------------------------------------
 if [ "$GERONIMO_ENV_INFO" != "off" ] ; then
   echo "Using GERONIMO_HOME:   $GERONIMO_HOME"
+  echo "Using GERONIMO_SERVER: $GERONIMO_SERVER"
   echo "Using GERONIMO_TMPDIR: $GERONIMO_TMPDIR"
   echo "Using JRE_HOME:        $JRE_HOME"
 fi
@@ -203,9 +186,10 @@ if [ -f "$JAVA_AGENT_JAR" ]; then
     -javaagent:"$JAVA_AGENT_JAR" \
     -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
     -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+    -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
     -Dkaraf.home="$GERONIMO_HOME" \
-    -Dkaraf.base="$GERONIMO_HOME" \
-    -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+    -Dkaraf.base="$GERONIMO_SERVER" \
+    -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
     -Djava.endorsed.dirs="$ENDORSED_DIRS" \
     -Djava.ext.dirs="$EXT_DIRS" \
     -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -215,9 +199,10 @@ else
   exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
     -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
     -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+    -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
     -Dkaraf.home="$GERONIMO_HOME" \
-    -Dkaraf.base="$GERONIMO_HOME" \
-    -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+    -Dkaraf.base="$GERONIMO_SERVER" \
+    -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
     -Djava.endorsed.dirs="$ENDORSED_DIRS" \
     -Djava.ext.dirs="$EXT_DIRS" \
     -Djava.io.tmpdir="$GERONIMO_TMPDIR" \

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy Mon Feb 20 13:55:47 2012
@@ -38,12 +38,19 @@
 #   GERONIMO_HOME   (Optional) May point at your Geronimo top-level directory.
 #                   If not specified, it will default to the parent directory
 #                   of the location of this script.
+#                   The HOME directory holds the binary install of Geronimo.
+#
+#   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+#                   top-level directory. If not specified, it will default to
+#                   $GERONIMO_HOME.
+#                   The SERVER directory holds the configuration and data for 
+#                   a Geronimo instance.
 #
 #   GERONIMO_OPTS   (Optional) Java runtime options.
 #
 #   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir). Defaults to var/temp
-#                   (resolved to server instance directory).
+#                   (resolved to server instance directory GERONIMO_SERVER).
 #
 #   JAVA_HOME       Points to your Java Development Kit installation.
 #                   JAVA_HOME doesn't need to be set if JRE_HOME is set.
@@ -85,16 +92,6 @@
 #  1 - Error
 # -----------------------------------------------------------------------------
 
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-darwin=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-Darwin*) darwin=true;;
-esac
-
 # resolve links - $0 may be a softlink
 PRG="$0"
 
@@ -114,15 +111,25 @@ PRGDIR=`dirname "$PRG"`
 # Only set GERONIMO_HOME if not already set
 [ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`
 
-if [ -r "$GERONIMO_HOME"/bin/setenv.sh ]; then
+if [ -f "$GERONIMO_HOME"/bin/setenv.sh ]; then
   . "$GERONIMO_HOME"/bin/setenv.sh
 fi
 
+if [ -f "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
+    BASEDIR="$GERONIMO_HOME"
+    . "$GERONIMO_HOME"/bin/setjavaenv.sh
+else
+    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
+    echo "This file is needed to run this program"
+    exit 1
+fi
+
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
   [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
+  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
 fi
 
 # For OS400
@@ -137,32 +144,6 @@ if $os400; then
   export QIBM_MULTI_THREADED=Y
 fi
 
-# Get standard Java environment variables
-# (based upon Tomcat's setclasspath.sh but renamed since Geronimo's classpath 
-# is set in the JAR manifest)
-if $os400; then
-  # -r will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  BASEDIR="$GERONIMO_HOME"
-  . "$GERONIMO_HOME"/bin/setjavaenv.sh 
-else
-  if [ -r "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
-    BASEDIR="$GERONIMO_HOME"
-    . "$GERONIMO_HOME"/bin/setjavaenv.sh
-  else
-    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
-if [ -z "$GERONIMO_TMPDIR" ] ; then
-  # Define the java.io.tmpdir to use for Geronimo
-  GERONIMO_TMPDIR=var/temp
-fi
-
 # Classpath: Add the jars in the lib dir
 for file in "$GERONIMO_HOME"/lib/*.jar
 do
@@ -183,6 +164,7 @@ if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
   JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
   GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
+  GERONIMO_SERVER=`cygpath --absolute --windows "$GERONIMO_SERVER"`
   GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
   EXT_DIRS=`cygpath --path --windows "$EXT_DIRS"`
@@ -192,6 +174,7 @@ fi
 # ----- Execute The Requested Command -----------------------------------------
 if [ "$GERONIMO_ENV_INFO" != "off" ] ; then
   echo "Using GERONIMO_HOME:   $GERONIMO_HOME"
+  echo "Using GERONIMO_SERVER: $GERONIMO_SERVER"
   echo "Using GERONIMO_TMPDIR: $GERONIMO_TMPDIR"
   echo "Using JRE_HOME:        $JRE_HOME"
 fi
@@ -199,9 +182,10 @@ fi
 "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
   -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
   -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+  -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
   -Dkaraf.home="$GERONIMO_HOME" \
-  -Dkaraf.base="$GERONIMO_HOME" \
-  -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+  -Dkaraf.base="$GERONIMO_SERVER" \
+  -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
   -Djava.endorsed.dirs="$ENDORSED_DIRS" \
   -Djava.ext.dirs="$EXT_DIRS" \
   -Djava.io.tmpdir="$GERONIMO_TMPDIR" \

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo Mon Feb 20 13:55:47 2012
@@ -44,6 +44,13 @@
 #   GERONIMO_HOME   (Optional) May point at your Geronimo top-level directory.
 #                   If not specified, it will default to the parent directory
 #                   of the location of this script.
+#                   The HOME directory holds the binary install of Geronimo.
+#
+#   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+#                   top-level directory. If not specified, it will default to
+#                   $GERONIMO_HOME.
+#                   The SERVER directory holds the configuration and data for
+#                   a Geronimo instance.
 #
 #   GERONIMO_OPTS   (Optional) Java runtime options used when the "start",
 #                   "stop", or "run" command is executed.
@@ -51,14 +58,14 @@
 #   GERONIMO_OUT    (Optional) File that Geronimo's stdout and stderr streams
 #                   will be redirected to if Geronimo is started in the
 #                   background.
-#                   Defaults to $GERONIMO_HOME/var/log/geronimo.out
+#                   Defaults to $GERONIMO_SERVER/var/log/geronimo.out
 #
 #   GERONIMO_PID    (Optional) Path of the file which should contains the pid
 #                   of the Geronimo java process, when start (fork) is used
 #
 #   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir). Defaults to var/temp 
-#                   (resolved to server instance directory).
+#                   (resolved to server instance directory GERONIMO_SERVER).
 #
 #   JAVA_HOME       Points to your Java Development Kit installation.
 #                   JAVA_HOME doesn't need to be set if JRE_HOME is set
@@ -129,16 +136,6 @@
 #  1 - Error
 # -----------------------------------------------------------------------------
 
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-darwin=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-Darwin*) darwin=true;;
-esac
-
 # resolve links - $0 may be a softlink
 PRG="$0"
 
@@ -158,16 +155,26 @@ PRGDIR=`dirname "$PRG"`
 # Only set GERONIMO_HOME if not already set
 [ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`
 
-if [ -r "$GERONIMO_HOME"/bin/setenv.sh ]; then
+if [ -f "$GERONIMO_HOME"/bin/setenv.sh ]; then
   . "$GERONIMO_HOME"/bin/setenv.sh
 fi
 
+if [ -f "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
+    BASEDIR="$GERONIMO_HOME"
+    . "$GERONIMO_HOME"/bin/setjavaenv.sh
+else
+    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
+    echo "This file is needed to run this program"
+    exit 1
+fi
+
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
   [ -n "$JDB_SRCPATH" ] && JDB_SRCPATH=`cygpath --unix "$JDB_SRCPATH"`
   [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
+  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
 fi
 
 # For OS400
@@ -182,42 +189,15 @@ if $os400; then
   export QIBM_MULTI_THREADED=Y
 fi
 
-# Get standard Java environment variables
-# (based upon Tomcat's setclasspath.sh but renamed since Geronimo's classpath
-# is set in the JAR manifest)
-if $os400; then
-  # -r will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  BASEDIR="$GERONIMO_HOME"
-  . "$GERONIMO_HOME"/bin/setjavaenv.sh
-else
-  if [ -r "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
-    BASEDIR="$GERONIMO_HOME"
-    . "$GERONIMO_HOME"/bin/setjavaenv.sh
-  else
-    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
 # Use a default JAVA_OPTS if it's not set
 if [ -z "$JAVA_OPTS" ]; then
   JAVA_OPTS="-Xmx256m -XX:MaxPermSize=128m"
 fi
 
-if [ -z "$GERONIMO_TMPDIR" ] ; then
-  # Define the java.io.tmpdir to use for Geronimo
-  # A relative value will be resolved relative to each instance
-  GERONIMO_TMPDIR="$GERONIMO_HOME"/var/temp
-fi
-
 if [ -z "$GERONIMO_OUT" ] ; then
   # Define the output file we are to redirect both stdout and stderr to
   # when Geronimo is started in the background
-  GERONIMO_OUT="$GERONIMO_HOME"/var/log/geronimo.out
+  GERONIMO_OUT="$GERONIMO_SERVER"/var/log/geronimo.out
 fi
 
 if [ -z "$JDB_SRCPATH" ] ; then
@@ -247,6 +227,7 @@ if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
   JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
   GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
+  GERONIMO_SERVER=`cygpath --absolute --windows "$GERONIMO_SERVER"`
   GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
   EXT_DIRS=`cygpath --path --windows "$EXT_DIRS"`
@@ -256,6 +237,7 @@ fi
 # ----- Execute The Requested Command -----------------------------------------
 if [ "$GERONIMO_ENV_INFO" != "off" ] ; then
   echo "Using GERONIMO_HOME:   $GERONIMO_HOME"
+  echo "Using GERONIMO_SERVER: $GERONIMO_SERVER"
   echo "Using GERONIMO_TMPDIR: $GERONIMO_TMPDIR"
   if [ "$1" = "debug" ] ; then
     echo "Using JAVA_HOME:       $JAVA_HOME"
@@ -309,9 +291,10 @@ if [ "$1" = "debug" ] ; then
       -sourcepath "$JDB_SRCPATH" \
       -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=true \
       -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+      -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
       -Dkaraf.home="$GERONIMO_HOME" \
-      -Dkaraf.base="$GERONIMO_HOME" \
-      -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+      -Dkaraf.base="$GERONIMO_SERVER" \
+      -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
       -Djava.endorsed.dirs="$ENDORSED_DIRS" \
       -Djava.ext.dirs="$EXT_DIRS" \
       -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -326,9 +309,10 @@ elif [ "$1" = "run" ]; then
         -javaagent:"$JAVA_AGENT_JAR" \
         -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false \
         -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+        -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
         -Dkaraf.home="$GERONIMO_HOME" \
-        -Dkaraf.base="$GERONIMO_HOME" \
-        -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+        -Dkaraf.base="$GERONIMO_SERVER" \
+        -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
         -Djava.endorsed.dirs="$ENDORSED_DIRS" \
         -Djava.ext.dirs="$EXT_DIRS" \
         -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -338,9 +322,10 @@ elif [ "$1" = "run" ]; then
       exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
         -Dkaraf.startLocalConsole=true -Dkaraf.startRemoteShell=false \
         -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+        -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
         -Dkaraf.home="$GERONIMO_HOME" \
-        -Dkaraf.base="$GERONIMO_HOME" \
-        -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+        -Dkaraf.base="$GERONIMO_SERVER" \
+        -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
         -Djava.endorsed.dirs="$ENDORSED_DIRS" \
         -Djava.ext.dirs="$EXT_DIRS" \
         -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -362,9 +347,10 @@ elif [ "$1" = "start" ] ; then
           -javaagent:"$JAVA_AGENT_JAR" \
           -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
           -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
           -Dkaraf.home="$GERONIMO_HOME" \
-          -Dkaraf.base="$GERONIMO_HOME" \
-          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties \
+          -Dkaraf.base="$GERONIMO_SERVER" \
+          -Djava.util.logging.config.file=$GERONIMO_SERVER/etc/java.util.logging.properties \
           -Djava.endorsed.dirs="$ENDORSED_DIRS" \
           -Djava.ext.dirs="$EXT_DIRS" \
           -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -374,9 +360,10 @@ elif [ "$1" = "start" ] ; then
         exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
           -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
           -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
           -Dkaraf.home="$GERONIMO_HOME" \
-          -Dkaraf.base="$GERONIMO_HOME" \
-          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties \
+          -Dkaraf.base="$GERONIMO_SERVER" \
+          -Djava.util.logging.config.file=$GERONIMO_SERVER/etc/java.util.logging.properties \
           -Djava.endorsed.dirs="$ENDORSED_DIRS" \
           -Djava.ext.dirs="$EXT_DIRS" \
           -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -390,9 +377,10 @@ elif [ "$1" = "start" ] ; then
           -javaagent:"$JAVA_AGENT_JAR" \
           -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
           -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
           -Dkaraf.home="$GERONIMO_HOME" \
-          -Dkaraf.base="$GERONIMO_HOME" \
-          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties \
+          -Dkaraf.base="$GERONIMO_SERVER" \
+          -Djava.util.logging.config.file=$GERONIMO_SERVER/etc/java.util.logging.properties \
           -Djava.endorsed.dirs="$ENDORSED_DIRS" \
           -Djava.ext.dirs="$EXT_DIRS" \
           -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -408,9 +396,10 @@ elif [ "$1" = "start" ] ; then
         $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
           -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
           -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+          -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
           -Dkaraf.home="$GERONIMO_HOME" \
-          -Dkaraf.base="$GERONIMO_HOME" \
-          -Djava.util.logging.config.file=$GERONIMO_HOME/etc/java.util.logging.properties \
+          -Dkaraf.base="$GERONIMO_SERVER" \
+          -Djava.util.logging.config.file=$GERONIMO_SERVER/etc/java.util.logging.properties \
           -Djava.endorsed.dirs="$ENDORSED_DIRS" \
           -Djava.ext.dirs="$EXT_DIRS" \
           -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
@@ -439,9 +428,10 @@ elif [ "$1" = "stop" ] ; then
   "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
     -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false \
     -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+    -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
     -Dkaraf.home="$GERONIMO_HOME" \
-    -Dkaraf.base="$GERONIMO_HOME" \
-    -Djava.util.logging.config.file="$GERONIMO_HOME"/etc/java.util.logging.properties \
+    -Dkaraf.base="$GERONIMO_SERVER" \
+    -Djava.util.logging.config.file="$GERONIMO_SERVER"/etc/java.util.logging.properties \
     -Djava.endorsed.dirs="$ENDORSED_DIRS" \
     -Djava.ext.dirs="$EXT_DIRS" \
     -Djava.io.tmpdir="$GERONIMO_TMPDIR" \

Added: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh?rev=1291259&view=auto
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh (added)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh Mon Feb 20 13:55:47 2012
@@ -0,0 +1,150 @@
+#!/bin/sh
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+# --------------------------------------------------------------------
+# $Rev$ $Date$
+# --------------------------------------------------------------------
+
+# --------------------------------------------------------------------
+# Set environment variables relating to the execution of geronimo commands.
+#
+# This script file is called by the geronimo.sh file (which is invoked
+# by the startup.sh, shutdown.sh files).  This file is also invoked
+# by the deploy.sh file.
+#
+# It is preferable (to simplify migration to future Geronimo releases)
+# to set any environment variables you need in the setenv.sh file
+# rather than modifying Geronimo's script files.  See the documentation
+# in the geronimo.sh file for further information.
+#
+# (Based upon Apache Tomcat 5.5.12's setclasspath.sh)
+#
+# --------------------------------------------------------------------
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+darwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true;;
+esac
+
+
+# Set GERONIMO_SERVER if not already set, otherwise resolve the full path
+if [ -z "$GERONIMO_SERVER" ] ; then
+  GERONIMO_SERVER="$GERONIMO_HOME"
+else
+  if [ ! -d "$GERONIMO_SERVER" ] && [ -d "$GERONIMO_HOME/$GERONIMO_SERVER" ] ;
+  then
+    GERONIMO_SERVER="$GERONIMO_HOME/$GERONIMO_SERVER"
+  elif [ ! -d "$GERONIMO_SERVER" ] ; then
+    echo "Cannot find GERONIMO_SERVER. I looked for it at these paths:"
+    echo "    $GERONIMO_SERVER"
+    echo "    $GERONIMO_HOME/$GERONIMO_SERVER"
+    exit 1
+  fi
+
+  # Resolve the full path to GERONIMO_SERVER
+  while [ -h "$GERONIMO_SERVER" ]; do
+    ls=`ls -ld "$GERONIMO_SERVER"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      GERONIMO_SERVER="$link"
+    else
+      GERONIMO_SERVER=`dirname "$GERONIMO_SERVER"`/"$link"
+    fi
+  done
+
+  GERONIMO_SERVER=`cd "$GERONIMO_SERVER"; pwd`
+fi
+
+if [ -z "$GERONIMO_TMPDIR" ] ; then
+  # Define the java.io.tmpdir to use for Geronimo
+  GERONIMO_TMPDIR="$GERONIMO_SERVER"/var/temp
+fi
+
+# Make sure prerequisite environment variables are set
+if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+  if $darwin; then
+    if [ -d "/System/Library/Frameworks/JavaVM.framework/Home" ]; then
+      export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
+    fi
+  else
+    JAVA_PATH=`which java 2>/dev/null`
+    if [ "x$JAVA_PATH" != "x" ]; then
+      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
+      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
+      if [ -d "$JAVA_PATH/jre" ]; then
+        JAVA_HOME="$JAVA_PATH"
+        JRE_HOME="$JAVA_PATH/jre"
+      else
+        JRE_HOME="$JAVA_PATH"
+      fi
+    fi
+  fi
+
+  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+    echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
+    echo "At least one of these environment variable is needed to run this program"
+    exit 1
+  fi
+fi
+
+if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
+  echo "JAVA_HOME should point to a JDK in order to run in debug mode."
+  exit 1
+fi
+if [ -z "$JRE_HOME" ]; then
+   if [ -d "$JAVA_HOME/jre" ]; then
+     JRE_HOME="$JAVA_HOME/jre"
+   else
+     JRE_HOME="$JAVA_HOME"
+   fi
+fi
+
+# If we're running under jdb, we need a full jdk.
+if [ "$1" = "debug" ] ; then
+  if [ "$os400" = "true" ]; then
+    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
+      echo "The JAVA_HOME environment variable is not defined correctly"
+      echo "This environment variable is needed to run this program"
+      echo "NB: JAVA_HOME should point to a JDK not a JRE"
+      exit 1
+    fi
+  else
+    if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
+      echo "The JAVA_HOME environment variable is not defined correctly"
+      echo "This environment variable is needed to run this program"
+      echo "NB: JAVA_HOME should point to a JDK not a JRE"
+      exit 1
+    fi
+  fi
+fi
+
+if [ -z "$BASEDIR" ]; then
+  echo "The BASEDIR environment variable is not defined"
+  echo "This environment variable is needed to run this program"
+  exit 1
+fi
+
+# Set standard commands for invoking Java.
+_RUNJAVA="$JRE_HOME"/bin/java
+if [ "$os400" != "true" ]; then
+  _RUNJDB="$JAVA_HOME"/bin/jdb
+fi

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/client.bat Mon Feb 20 13:55:47 2012
@@ -37,13 +37,20 @@
 @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                   The HOME directory holds the binary install of Geronimo.
+@REM
+@REM   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+@REM                   top-level directory. If not specified, it will default to
+@REM                   $GERONIMO_HOME.
+@REM                   The SERVER directory holds the configuration and data for
+@REM                   a Geronimo instance.
 @REM
 @REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
 @REM                   those set in JAVA_OPTS).
 @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                   the JVM should use (java.io.tmpdir).  Defaults to var\tmp
+@REM                   (resolved to server instance directory GERONIMO_SERVER).
 @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.
@@ -131,33 +138,9 @@ cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
-call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+call "%GERONIMO_HOME%\bin\setjavaenv.bat"
 if not %errorlevel% == 0 goto end
 
-@REM Handle spaces in provided paths.  Also strips off quotes.
-if defined var GERONIMO_HOME(
-set GERONIMO_HOME=###%GERONIMO_HOME%###
-set GERONIMO_HOME=%GERONIMO_HOME:"###=%
-set GERONIMO_HOME=%GERONIMO_HOME:###"=%
-set GERONIMO_HOME=%GERONIMO_HOME:###=%
-@)
-if defined var JRE_HOME(
-set JRE_HOME=###%JRE_HOME%###
-set JRE_HOME=%JRE_HOME:"###=%
-set JRE_HOME=%JRE_HOME:###"=%
-set JRE_HOME=%JRE_HOME:###=%
-@)
-if defined var _RUNJAVA(
-set _RUNJAVA=###%_RUNJAVA%###
-set _RUNJAVA=%_RUNJAVA:"###=%
-set _RUNJAVA=%_RUNJAVA:###"=%
-set _RUNJAVA=%_RUNJAVA:###=%
-@)
-
-if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
-set GERONIMO_TMPDIR=var\temp
-:gotTmpdir
-
 @REM Setup the classpath
 pushd "%GERONIMO_HOME%\lib"
 for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
@@ -175,6 +158,7 @@ goto :EOF
 @REM ----- Execute The Requested Command ---------------------------------------
 @if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
 echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_SERVER: %GERONIMO_SERVER%
 echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
 if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
 if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
@@ -189,7 +173,7 @@ set JAVA_AGENT_JAR=%GERONIMO_HOME%\lib\a
 set JAVA_AGENT_OPTS=
 if exist "%JAVA_AGENT_JAR%" set JAVA_AGENT_OPTS=-javaagent:"%JAVA_AGENT_JAR%"
 
-%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" org.apache.geronimo.cli.client.ClientCLI %CMD_LINE_ARGS%
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%" -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_SERVER%" -Djava.util.logging.config.file="%GERONIMO_SERVER%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" org.apache.geronimo.cli.client.ClientCLI %CMD_LINE_ARGS%
 goto end
 
 :end

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/deploy.bat Mon Feb 20 13:55:47 2012
@@ -37,13 +37,20 @@
 @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                   The HOME directory holds the binary install of Geronimo.
+@REM
+@REM   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+@REM                   top-level directory. If not specified, it will default to
+@REM                   $GERONIMO_HOME.
+@REM                   The SERVER directory holds the configuration and data for
+@REM                   a Geronimo instance.
 @REM
 @REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
 @REM                   those set in JAVA_OPTS).
 @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                   the JVM should use (java.io.tmpdir).  Defaults to var\tmp
+@REM                   (resolved to server instance directory GERONIMO_SERVER).
 @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.
@@ -131,33 +138,9 @@ cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
-call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+call "%GERONIMO_HOME%\bin\setjavaenv.bat"
 if not %errorlevel% == 0 goto end
 
-@REM Handle spaces in provided paths.  Also strips off quotes.
-if defined var GERONIMO_HOME(
-set GERONIMO_HOME=###%GERONIMO_HOME%###
-set GERONIMO_HOME=%GERONIMO_HOME:"###=%
-set GERONIMO_HOME=%GERONIMO_HOME:###"=%
-set GERONIMO_HOME=%GERONIMO_HOME:###=%
-@)
-if defined var JRE_HOME(
-set JRE_HOME=###%JRE_HOME%###
-set JRE_HOME=%JRE_HOME:"###=%
-set JRE_HOME=%JRE_HOME:###"=%
-set JRE_HOME=%JRE_HOME:###=%
-@)
-if defined var _RUNJAVA(
-set _RUNJAVA=###%_RUNJAVA%###
-set _RUNJAVA=%_RUNJAVA:"###=%
-set _RUNJAVA=%_RUNJAVA:###"=%
-set _RUNJAVA=%_RUNJAVA:###=%
-@)
-
-if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
-set GERONIMO_TMPDIR=var\temp
-:gotTmpdir
-
 @REM Setup the classpath
 pushd "%GERONIMO_HOME%\lib"
 for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
@@ -175,6 +158,7 @@ goto :EOF
 @REM ----- Execute The Requested Command ---------------------------------------
 @if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
 echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_SERVER: %GERONIMO_SERVER%
 echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
 if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
 if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
@@ -184,7 +168,7 @@ if "%_REQUIRE_JDK%" == "0" echo Using JR
 @REM Capture any passed in arguments
 set CMD_LINE_ARGS=%*
 
-%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" org.apache.geronimo.cli.deployer.DeployerCLI %CMD_LINE_ARGS%
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=false -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%" -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_SERVER%" -Djava.util.logging.config.file="%GERONIMO_SERVER%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" org.apache.geronimo.cli.deployer.DeployerCLI %CMD_LINE_ARGS%
 goto end
 
 :end

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/geronimo.bat Mon Feb 20 13:55:47 2012
@@ -43,14 +43,21 @@
 @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                   The HOME directory holds the binary install of Geronimo.
+@REM
+@REM   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+@REM                   top-level directory. If not specified, it will default to
+@REM                   $GERONIMO_HOME.
+@REM                   The SERVER directory holds the configuration and data for
+@REM                   a Geronimo instance.
 @REM
 @REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
 @REM                   those set in JAVA_OPTS) used when the "start",
 @REM                   "stop", or "run" command is executed.
 @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                   the JVM should use (java.io.tmpdir).  Defaults to var\tmp
+@REM                   (resolved to server instance directory GERONIMO_SERVER).
 @REM
 @REM   GERONIMO_WIN_START_ARGS  (Optional) additional arguments to the Windows
 @REM                            START command when the "start" command
@@ -168,39 +175,14 @@ cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
-call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+call "%GERONIMO_HOME%\bin\setjavaenv.bat"
 if not %errorlevel% == 0 goto end
 
-@REM Handle spaces in provided paths.  Also strips off quotes.
-if defined var GERONIMO_HOME(
-set GERONIMO_HOME=###%GERONIMO_HOME%###
-set GERONIMO_HOME=%GERONIMO_HOME:"###=%
-set GERONIMO_HOME=%GERONIMO_HOME:###"=%
-set GERONIMO_HOME=%GERONIMO_HOME:###=%
-@)
-if defined var JRE_HOME(
-set JRE_HOME=###%JRE_HOME%###
-set JRE_HOME=%JRE_HOME:"###=%
-set JRE_HOME=%JRE_HOME:###"=%
-set JRE_HOME=%JRE_HOME:###=%
-@)
-if defined var _RUNJAVA(
-set _RUNJAVA=###%_RUNJAVA%###
-set _RUNJAVA=%_RUNJAVA:"###=%
-set _RUNJAVA=%_RUNJAVA:###"=%
-set _RUNJAVA=%_RUNJAVA:###=%
-@)
-
 @REM Using default JAVA_OPTS if it's not set
 if not "%JAVA_OPTS%" == "" goto skipDefaultJavaOpts
 set JAVA_OPTS=-Xmx256m -XX:MaxPermSize=128m
 :skipDefaultJavaOpts
 
-if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
-@REM A relative value will be resolved relative to each instance 
-set GERONIMO_TMPDIR=%GERONIMO_HOME%\var\temp
-:gotTmpdir
-
 @REM Setup the classpath
 pushd "%GERONIMO_HOME%\lib"
 for %%G in (*.*) do call:APPEND_TO_CLASSPATH %%G
@@ -245,6 +227,7 @@ shift
 @REM ----- Execute The Requested Command ---------------------------------------
 @if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
 echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_SERVER: %GERONIMO_SERVER%
 echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
 if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
 if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
@@ -310,7 +293,7 @@ goto execCmd
 :doStart
 echo.
 echo Starting Geronimo as background process. 
-echo See output from %GERONIMO_HOME%/var/log/geronimo.out
+echo See output from %GERONIMO_SERVER%\var\log\geronimo.out
 shift
 @REM use long format of startup progress to be consistent with
 @REM the unix version of the start processing
@@ -356,11 +339,11 @@ cmd /c exit /b 0
 
 @REM Execute Java with the applicable properties
 if not "%JDB%" == "" goto doJDB
-%_EXECJAVA% -Dorg.apache.xbean.osgi.bundle.util.BundleResourceHelper.searchWiredBundles=false %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %_LONG_OPT% %CMD_LINE_ARGS%
+%_EXECJAVA% -Dorg.apache.xbean.osgi.bundle.util.BundleResourceHelper.searchWiredBundles=false %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%" -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_SERVER%" -Djava.util.logging.config.file="%GERONIMO_SERVER%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %_LONG_OPT% %CMD_LINE_ARGS%
 goto end
 
 :doJDB
-%_EXECJAVA% -Dorg.apache.xbean.osgi.bundle.util.BundleResourceHelper.searchWiredBundles=false %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -sourcepath "%JDB_SRCPATH%" %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %CMD_LINE_ARGS%
+%_EXECJAVA% -Dorg.apache.xbean.osgi.bundle.util.BundleResourceHelper.searchWiredBundles=false %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -sourcepath "%JDB_SRCPATH%" %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%" -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_SERVER%" -Djava.util.logging.config.file="%GERONIMO_SERVER%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %CMD_LINE_ARGS%
 goto end
 
 :end

Modified: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/internalLauncher.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/internalLauncher.bat?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/internalLauncher.bat (original)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/internalLauncher.bat Mon Feb 20 13:55:47 2012
@@ -26,6 +26,6 @@ if ""%1""=="""" goto doneSetArgs
 set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
 
 :doneSetArgs
-%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%"  -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_HOME%" -Djava.util.logging.config.file="%GERONIMO_HOME%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %_LONG_OPT% %CMD_LINE_ARGS% >> "%GERONIMO_HOME%\var\log\geronimo.out" 2>&1
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% %CONSOLE_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%" -Dkaraf.home="%GERONIMO_HOME%" -Dkaraf.base="%GERONIMO_SERVER%" -Djava.util.logging.config.file="%GERONIMO_SERVER%\etc\java.util.logging.properties" -Djava.endorsed.dirs="%GERONIMO_HOME%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Djava.ext.dirs="%GERONIMO_HOME%\lib\ext;%JRE_HOME%\lib\ext" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -classpath "%CLASSPATH%" %MAINCLASS% %_LONG_OPT% %CMD_LINE_ARGS% >> "%GERONIMO_SERVER%\var\log\geronimo.out" 2>&1
 if not %errorlevel% == 0 pause
 exit %errorlevel%

Added: geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat?rev=1291259&view=auto
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat (added)
+++ geronimo/server/branches/3.0-beta/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/setjavaenv.bat Mon Feb 20 13:55:47 2012
@@ -0,0 +1,138 @@
+@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 --------------------------------------------------------------------
+@REM $Rev: 741689 $ $Date: 2009-02-06 14:38:00 -0500 (Fri, 06 Feb 2009) $
+@REM --------------------------------------------------------------------
+
+@REM --------------------------------------------------------------------
+@REM Set environment variables relating to the execution of geronimo commands
+@REM
+@REM This batch file is called by the geronimo.bat file (which is
+@REM invoked by the startup.bat, shutdown.bat files).  This file is
+@REM also invoked by the deploy.bat file.
+@REM
+@REM It is preferable (to simplify migration to future Geronimo releases)
+@REM to set any environment variables you need in the setenv.bat file
+@REM rather than modifying Geronimo's script files.  See the documentation
+@REM in the geronimo.bat file for further information.
+@REM
+@REM (Based upon Apache Tomcat 5.5.12's setclasspath.bat although modified
+@REM to be more consistent with the shell script version's support of
+@REM JDK_HOME and JRE_HOME)
+@REM
+@REM --------------------------------------------------------------------
+
+@REM Begin all @REM lines with '@' in case GERONIMO_BATCH_ECHO is 'on'
+@if "%GERONIMO_BATCH_ECHO%" == "on"  echo on
+@if not "%GERONIMO_BATCH_ECHO%" == "on"  echo off
+
+@REM Set GERONIMO_SERVER to GERONIMO_HOME if not defined, else resolve full path
+if not "%GERONIMO_SERVER%" == "" goto resolveServer
+set GERONIMO_SERVER=%GERONIMO_HOME%
+goto gotServer
+
+:resolveServer
+@REM Strip quotes from GERONIMO_SERVER which is defined by user
+if defined var GERONIMO_SERVER(
+set GERONIMO_HOME=###%GERONIMO_SERVER%###
+set GERONIMO_HOME=%GERONIMO_SERVER:"###=%
+set GERONIMO_HOME=%GERONIMO_SERVER:###"=%
+set GERONIMO_HOME=%GERONIMO_SERVER:###=%
+@)
+set CURRENT_DIR=%cd%
+cd /d "%GERONIMO_HOME%"
+if exist "%GERONIMO_SERVER%" goto okResolveServer
+cd /d "%CURRENT_DIR%"
+goto errorServer
+
+:okResolveServer
+cd /d "%GERONIMO_SERVER%"
+set GERONIMO_SERVER=%cd%
+cd /d "%CURRENT_DIR%"
+
+:gotServer
+if exist "%GERONIMO_SERVER%\var" goto okServer
+
+:errorServer
+echo The GERONIMO_SERVER environment variable is not defined correctly
+echo This environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+:okServer
+
+if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
+set GERONIMO_TMPDIR=%GERONIMO_SERVER%\var\temp
+:gotTmpdir
+
+@REM Strip quotes from JRE_HOME and JAVA_HOME before using them
+if defined var JRE_HOME(
+set JRE_HOME=###%JRE_HOME%###
+set JRE_HOME=%JRE_HOME:"###=%
+set JRE_HOME=%JRE_HOME:###"=%
+set JRE_HOME=%JRE_HOME:###=%
+@)
+if defined var _RUNJAVA(
+set _RUNJAVA=###%_RUNJAVA%###
+set _RUNJAVA=%_RUNJAVA:"###=%
+set _RUNJAVA=%_RUNJAVA:###"=%
+set _RUNJAVA=%_RUNJAVA:###=%
+@)
+
+@REM check that either JAVA_HOME or JRE_HOME are set
+set jdkOrJreHomeSet=0
+if not "%JAVA_HOME%" == "" set jdkOrJreHomeSet=1
+if not "%JRE_HOME%" == "" set jdkOrJreHomeSet=1
+if "%jdkOrJreHomeSet%" == "1" goto gotJdkOrJreHome
+echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
+echo At least one of these environment variable is needed to run this program
+cmd /c exit /b 1
+goto end
+
+@REM If we get this far we have either JAVA_HOME or JRE_HOME set
+@REM now check whether the command requires the JDK and if so
+@REM check that JAVA_HOME is really pointing to the JDK files.
+:gotJdkOrJreHome
+set _REQUIRE_JDK=0
+if "%1" == "debug" set _REQUIRE_JDK=1
+if "%_REQUIRE_JDK%" == "0" goto okJdkFileCheck
+
+set jdkNotFound=0
+if not exist "%JAVA_HOME%\bin\java.exe" set jdkNotFound=1
+if not exist "%JAVA_HOME%\bin\javaw.exe" set jdkNotFound=1
+if not exist "%JAVA_HOME%\bin\jdb.exe" set jdkNotFound=1
+if not exist "%JAVA_HOME%\bin\javac.exe" set jdkNotFound=1
+if %jdkNotFound% == 0 goto okJdkFileCheck
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK not a JRE
+cmd /c exit /b 1
+goto end
+
+:okJdkFileCheck
+@REM default JRE_HOME to JAVA_HOME if not set.
+if "%JRE_HOME%" == "" if exist "%JAVA_HOME%\bin\javac.exe" (set JRE_HOME="%JAVA_HOME%\jre") else set JRE_HOME=%JAVA_HOME%
+
+@REM Set standard command for invoking Java.
+@REM Note that NT requires a window name argument when using start.
+@REM Also note the quoting as JAVA_HOME may contain spaces.
+set _RUNJAVA="%JRE_HOME%\bin\java"
+set _RUNJAVAW="%JRE_HOME%\bin\javaw"
+set _RUNJDB="%JAVA_HOME%\bin\jdb"
+
+:end
+@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on'
+if "%GERONIMO_BATCH_PAUSE%" == "on" pause

Modified: geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.bat?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.bat (original)
+++ geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.bat Mon Feb 20 13:55:47 2012
@@ -35,13 +35,20 @@
 @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                   The HOME directory holds the binary install of Geronimo.
+@REM
+@REM   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+@REM                   top-level directory. If not specified, it will default to
+@REM                   $GERONIMO_HOME.
+@REM                   The SERVER directory holds the configuration and data for
+@REM                   a Geronimo instance.
 @REM
 @REM   GERONIMO_OPTS   (Optional) Java runtime options (in addition to
 @REM                   those set in JAVA_OPTS).
 @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                   the JVM should use (java.io.tmpdir).  Defaults to var\tmp
+@REM                   (resolved to server instance directory GERONIMO_SERVER).
 @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.
@@ -129,16 +136,13 @@ cmd /c exit /b 1
 goto end
 :okSetJavaEnv
 set BASEDIR=%GERONIMO_HOME%
-call "%GERONIMO_HOME%\bin\setJavaEnv.bat"
+call "%GERONIMO_HOME%\bin\setjavaenv.bat"
 if not %errorlevel% == 0 goto end
 
-if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir
-set GERONIMO_TMPDIR=var\temp
-:gotTmpdir
-
 @REM ----- Execute The Requested Command ---------------------------------------
 @if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo
 echo Using GERONIMO_HOME:   %GERONIMO_HOME%
+echo Using GERONIMO_SERVER: %GERONIMO_SERVER%
 echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR%
 if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME:       %JAVA_HOME%
 if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME:        %JRE_HOME%
@@ -149,7 +153,7 @@ if "%_REQUIRE_JDK%" == "0" echo Using JR
 set CMD_LINE_ARGS=%*
 set _JARFILE="%GERONIMO_HOME%"\bin\jaxws-tools.jar
 
-%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %CMD_LINE_ARGS%
+%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" -Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %CMD_LINE_ARGS%
 goto end
 
 :end

Modified: geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.sh
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.sh?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.sh (original)
+++ geronimo/server/branches/3.0-beta/plugins/jaxws/jaxws-tools/src/main/resources/contents/bin/jaxws-tools.sh Mon Feb 20 13:55:47 2012
@@ -36,12 +36,19 @@
 #   GERONIMO_HOME   (Optional) May point at your Geronimo top-level directory.
 #                   If not specified, it will default to the parent directory
 #                   of the location of this script.
+#                   The HOME directory holds the binary install of Geronimo.
+#
+#   GERONIMO_SERVER (Optional) May point at your Geronimo Server Instance
+#                   top-level directory. If not specified, it will default to
+#                   $GERONIMO_HOME.
+#                   The SERVER directory holds the configuration and data for 
+#                   a Geronimo instance.
 #
 #   GERONIMO_OPTS   (Optional) Java runtime options.
 #
 #   GERONIMO_TMPDIR (Optional) Directory path location of temporary directory
 #                   the JVM should use (java.io.tmpdir). Defaults to var/temp
-#                   (resolved to server instance directory).
+#                   (resolved to server instance directory GERONIMO_SERVER).
 #
 #   JAVA_HOME       Points to your Java Development Kit installation.
 #                   JAVA_HOME doesn't need to be set if JRE_HOME is set.
@@ -83,14 +90,6 @@
 #  1 - Error
 # -----------------------------------------------------------------------------
 
-# OS specific support.  $var _must_ be set to either true or false.
-cygwin=false
-os400=false
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-OS400*) os400=true;;
-esac
-
 # resolve links - $0 may be a softlink
 PRG="$0"
 
@@ -110,15 +109,25 @@ PRGDIR=`dirname "$PRG"`
 # Only set GERONIMO_HOME if not already set
 [ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd`
 
-if [ -r "$GERONIMO_HOME"/bin/setenv.sh ]; then
+if [ -f "$GERONIMO_HOME"/bin/setenv.sh ]; then
   . "$GERONIMO_HOME"/bin/setenv.sh
 fi
 
+if [ -f "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
+    BASEDIR="$GERONIMO_HOME"
+    . "$GERONIMO_HOME"/bin/setjavaenv.sh
+else
+    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
+    echo "This file is needed to run this program"
+    exit 1
+fi
+
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
   [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
   [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"`
+  [ -n "$GERONIMO_SERVER" ] && GERONIMO_SERVER=`cygpath --unix "$GERONIMO_SERVER"`
 fi
 
 # For OS400
@@ -133,30 +142,9 @@ if $os400; then
   export QIBM_MULTI_THREADED=Y
 fi
 
-# Get standard Java environment variables
-# (based upon Tomcat's setclasspath.sh but renamed since Geronimo's classpath 
-# is set in the JAR manifest)
-if $os400; then
-  # -r will Only work on the os400 if the files are:
-  # 1. owned by the user
-  # 2. owned by the PRIMARY group of the user
-  # this will not work if the user belongs in secondary groups
-  BASEDIR="$GERONIMO_HOME"
-  . "$GERONIMO_HOME"/bin/setjavaenv.sh 
-else
-  if [ -r "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then
-    BASEDIR="$GERONIMO_HOME"
-    . "$GERONIMO_HOME"/bin/setjavaenv.sh
-  else
-    echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh"
-    echo "This file is needed to run this program"
-    exit 1
-  fi
-fi
-
 if [ -z "$GERONIMO_TMPDIR" ] ; then
   # Define the java.io.tmpdir to use for Geronimo
-  GERONIMO_TMPDIR=var/temp
+  GERONIMO_TMPDIR="$GERONIMO_SERVER"/var/temp
 fi
 
 # For Cygwin, switch paths to Windows format before running java
@@ -164,12 +152,14 @@ if $cygwin; then
   JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
   JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
   GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
+  GERONIMO_SERVER=`cygpath --absolute --windows "$GERONIMO_SERVER"`
   GERONIMO_TMPDIR=`cygpath --absolute --windows "$GERONIMO_TMPDIR"`
 fi
 
 # ----- Execute The Requested Command -----------------------------------------
 if [ "$GERONIMO_ENV_INFO" != "off" ] ; then
   echo "Using GERONIMO_HOME:   $GERONIMO_HOME"
+  echo "Using GERONIMO_SERVER: $GERONIMO_SERVER"
   echo "Using GERONIMO_TMPDIR: $GERONIMO_TMPDIR"
   if [ "$1" = "debug" ] ; then
     echo "Using JAVA_HOME:       $JAVA_HOME"
@@ -181,5 +171,6 @@ fi
 
 exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
   -Dorg.apache.geronimo.home.dir="$GERONIMO_HOME" \
+  -Dorg.apache.geronimo.server.dir="$GERONIMO_SERVER" \
   -Djava.io.tmpdir="$GERONIMO_TMPDIR" \
   -jar "$GERONIMO_HOME"/bin/jaxws-tools.jar "$@" 

Modified: geronimo/server/branches/3.0-beta/plugins/procrun/src/main/resources/bin/service_pr.bat
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/procrun/src/main/resources/bin/service_pr.bat?rev=1291259&r1=1291258&r2=1291259&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/procrun/src/main/resources/bin/service_pr.bat (original)
+++ geronimo/server/branches/3.0-beta/plugins/procrun/src/main/resources/bin/service_pr.bat Mon Feb 20 13:55:47 2012
@@ -232,7 +232,7 @@ set PR_STDERROR=%PR_LOGPATH%\geronimosrv
 @REM set jvm arguments to avoid killing the service when logging off, when using Sun JDK.
 set JVMARGS=-Xrs
 
-"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartImage %JAVA_EXE% --StartPath "%GERONIMO_HOME%" --StartMode exe --StartParams %JVMARGS%#%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%"#-Dkaraf.startLocalConsole=false#-Dkaraf.startRemoteShell=true#-Dkaraf.home="%GERONIMO_HOME%"#-Dkaraf.base="%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%"#-Dkaraf.startLocalConsole=false#-Dkaraf.startRemoteShell=false#-Dkaraf.home="%GERONIMO_HOME%"#-Dkaraf.base="%GERONIMO_HOME%"#-Djava.io.tmpdir="%GERON
 IMO_TMPDIR%"#-jar#"%GERONIMO_HOME%\bin\shutdown.jar"#%SHUTDOWN_ARGS%
+"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartImage %JAVA_EXE% --StartPath "%GERONIMO_HOME%" --StartMode exe --StartParams %JVMARGS%#%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%"#-Dkaraf.startLocalConsole=false#-Dkaraf.startRemoteShell=true#-Dkaraf.home="%GERONIMO_HOME%"#-Dkaraf.base="%GERONIMO_SERVER%"#-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%"#-Dorg.apache.geronimo.server.dir="%GERONIMO_SERVER%"#-Dkaraf.startLocalConsole=false#-Dkaraf.startRemoteShell=false#-Dkaraf.home="%GERONIMO_HOME%"#
 -Dkaraf.base="%GERONIMO_SERVER%"#-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. Refer to the log in var/log/geronimosrv.log
 goto end