tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject svn commit: r719114 - /openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java
Date Wed, 19 Nov 2008 22:51:46 GMT
Author: jgallimore
Date: Wed Nov 19 14:51:46 2008
New Revision: 719114

URL: http://svn.apache.org/viewvc?rev=719114&view=rev
Log:
OPENEJB-956 look for java agent in CATALINA_HOME instead of CATALINA_BASE

Modified:
    openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java?rev=719114&r1=719113&r2=719114&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java
(original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java
Wed Nov 19 14:51:46 2008
@@ -213,11 +213,11 @@
         }
 
         // add our magic bits to the catalina sh file
-        String openejbJavaagentPath = paths.getCatalinaBaseDir().toURI().relativize(javaagentJar.toURI()).getPath();
+        String openejbJavaagentPath = paths.getCatalinaHomeDir().toURI().relativize(javaagentJar.toURI()).getPath();
         String newCatalinaSh = catalinaShOriginal.replace("# ----- Execute The Requested
Command",
                 "# Add OpenEJB javaagent\n" +
-                "if [ -r \"$CATALINA_BASE\"/" + openejbJavaagentPath + " ]; then\n" +
-                "  JAVA_OPTS=\"\"-javaagent:$CATALINA_BASE/" + openejbJavaagentPath + "\"
$JAVA_OPTS\"\n" +
+                "if [ -r \"$CATALINA_HOME\"/" + openejbJavaagentPath + " ]; then\n" +
+                "  JAVA_OPTS=\"\"-javaagent:$CATALINA_HOME/" + openejbJavaagentPath + "\"
$JAVA_OPTS\"\n" +
                 "fi\n" +
                 "\n" +
                 "# ----- Execute The Requested Command");
@@ -254,8 +254,8 @@
         openejbJavaagentPath = openejbJavaagentPath.replace('/', '\\');
         String newCatalinaBat = catalinaBatOriginal.replace("rem ----- Execute The Requested
Command",
                 "rem Add OpenEJB javaagent\r\n" +
-                "if not exist \"%CATALINA_BASE%\\" + openejbJavaagentPath + "\" goto noOpenEJBJavaagent\r\n"
+
-                "set JAVA_OPTS=\"-javaagent:%CATALINA_BASE%\\" + openejbJavaagentPath + "\"
%JAVA_OPTS%\r\n" +
+                "if not exist \"%CATALINA_HOME%\\" + openejbJavaagentPath + "\" goto noOpenEJBJavaagent\r\n"
+
+                "set JAVA_OPTS=\"-javaagent:%CATALINA_HOME%\\" + openejbJavaagentPath + "\"
%JAVA_OPTS%\r\n" +
                 ":noOpenEJBJavaagent\r\n" +
                 "\r\n" +
                 "rem ----- Execute The Requested Command");



Mime
View raw message