geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r517581 - in /geronimo/server/trunk: assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/ maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/ modules/geronimo-jetty6/
Date Tue, 13 Mar 2007 08:01:54 GMT
Author: jdillon
Date: Tue Mar 13 01:01:53 2007
New Revision: 517581

URL: http://svn.apache.org/viewvc?view=rev&rev=517581
Log:
(GERONIMO-2951) Include -javaagent:bin/jpa.jar if the jpa.jar exists

Modified:
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.bat
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.sh
    geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
    geronimo/server/trunk/modules/geronimo-jetty6/pom.xml

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.bat
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.bat?view=diff&rev=517581&r1=517580&r2=517581
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.bat
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.bat
Tue Mar 13 01:01:53 2007
@@ -307,9 +307,14 @@
 goto setArgs
 :doneSetArgs
 
+@REM Setup the Java programming language agent
+set JAVA_AGENT_JAR=%GERONIMO_BASE%\bin\jpa.jar
+set JAVA_AGENT_OPTS=
+if exist "%JAVA_AGENT_JAR%" goto set JAVA_AGENT_OPTS=-javaagent:%JAVA_AGENT_JAR%
+
 @REM Execute Java with the applicable properties
 if not "%JDB%" == "" goto doJDB
-%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Djava.ext.dirs="%JRE_HOME%/lib/ext;%GERONIMO_BASE%/lib/ext"
-Djava.endorsed.dirs="%JRE_HOME%\lib\endorsed;%GERONIMO_BASE%\lib\endorsed" -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%"
-Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
+%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% "%JAVA_AGENT_OPTS%" -Djava.ext.dirs="%JRE_HOME%/lib/ext;%GERONIMO_BASE%/lib/ext"
-Djava.endorsed.dirs="%JRE_HOME%\lib\endorsed;%GERONIMO_BASE%\lib\endorsed" -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%"
-Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
 goto end
 
 :doJDB

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.sh
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.sh?view=diff&rev=517581&r1=517580&r2=517581
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.sh
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/bin/geronimo.sh
Tue Mar 13 01:01:53 2007
@@ -282,6 +282,14 @@
   shift
 fi
 
+# Setup the Java programming language agent
+JAVA_AGENT_JAR="$GERONIMO_BASE/bin/jpa.jar"
+if [ -f "$JAVA_AGENT_JAR" ]; then
+    JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
+else
+    JAVA_AGENT_OPTS=""
+fi
+
 if [ "$1" = "debug" ] ; then
   if $os400; then
     echo "Debug command not available on OS400"
@@ -303,9 +311,9 @@
   fi
 
 elif [ "$1" = "run" ]; then
-
   shift
   exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+    $JAVA_AGENT_OPTS \
     -Dorg.apache.geronimo.base.dir="$GERONIMO_BASE" \
     -Djava.endorsed.dirs="$ENDORSED_DIRS" \
     -Djava.ext.dirs="$EXT_DIRS" \
@@ -313,10 +321,10 @@
     -jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
 
 elif [ "$1" = "start" ] ; then
-
   shift
   touch "$GERONIMO_OUT"
   $START_OS_CMD "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \
+    $JAVA_AGENT_OPTS \
     -Dorg.apache.geronimo.base.dir="$GERONIMO_BASE" \
     -Djava.endorsed.dirs="$ENDORSED_DIRS" \
     -Djava.ext.dirs="$EXT_DIRS" \
@@ -330,7 +338,6 @@
     fi
 
 elif [ "$1" = "stop" ] ; then
-
   shift
   FORCE=0
 # support -force as that is the option Tomcat uses, we will document

Modified: geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java?view=diff&rev=517581&r1=517580&r2=517581
==============================================================================
--- geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
(original)
+++ geronimo/server/trunk/maven-plugins/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java
Tue Mar 13 01:01:53 2007
@@ -141,7 +141,13 @@
         if (maximumMemory != null) {
             java.setMaxmemory(maximumMemory);
         }
-
+        
+        // Load the Java programming language agent for JPA
+        File javaAgentJar = new File(geronimoHome, "bin/jpa.jar");
+        if (javaAgentJar.exists()) {
+            java.createJvmarg().setValue("-javaagent:" + javaAgentJar.getCanonicalPath());
+        }
+        
         // Apply option sets
         if (options != null  && (optionSets == null || optionSets.length == 0)) {
             throw new MojoExecutionException("At least one optionSet must be defined to select
one using options");

Modified: geronimo/server/trunk/modules/geronimo-jetty6/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/pom.xml?view=diff&rev=517581&r1=517580&r2=517581
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/pom.xml (original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/pom.xml Tue Mar 13 01:01:53 2007
@@ -115,7 +115,6 @@
             <scope>test</scope>
         </dependency>
 
-
     </dependencies>
     
     <build>



Mime
View raw message