activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1292413 - in /activemq/trunk: activemq-console/src/main/java/org/apache/activemq/console/ activemq-console/src/test/java/org/apache/activemq/console/command/ assembly/src/release/bin/
Date Wed, 22 Feb 2012 17:35:37 GMT
Author: chirino
Date: Wed Feb 22 17:35:37 2012
New Revision: 1292413

URL: http://svn.apache.org/viewvc?rev=1292413&view=rev
Log:
Set the java.io.tmpdir to be the ${ACTIVEM_BASE}/tmp directory.  This way it's easy to find
and delete temp files (like the ones jetty uses).

Modified:
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
    activemq/trunk/activemq-console/src/test/java/org/apache/activemq/console/command/LowercasingPasswordFactory.java
    activemq/trunk/assembly/src/release/bin/activemq
    activemq/trunk/assembly/src/release/bin/activemq-admin
    activemq/trunk/assembly/src/release/bin/activemq-admin.bat
    activemq/trunk/assembly/src/release/bin/activemq.bat

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java?rev=1292413&r1=1292412&r2=1292413&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java Wed
Feb 22 17:35:37 2012
@@ -53,6 +53,13 @@ public class Main {
     private Set<File> activeMQClassPath = new HashSet<File>(5);
 
     public static void main(String[] args) {
+
+        // Create the tmpdir if it does not exist yet..
+        File tmpdir = new File(System.getProperty("java.io.tmpdir"));
+        if(!tmpdir.exists()) {
+            tmpdir.mkdirs();
+        }
+
         Main app = new Main();
 
         // Convert arguments to collection for easier management

Modified: activemq/trunk/activemq-console/src/test/java/org/apache/activemq/console/command/LowercasingPasswordFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/test/java/org/apache/activemq/console/command/LowercasingPasswordFactory.java?rev=1292413&r1=1292412&r2=1292413&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/test/java/org/apache/activemq/console/command/LowercasingPasswordFactory.java
(original)
+++ activemq/trunk/activemq-console/src/test/java/org/apache/activemq/console/command/LowercasingPasswordFactory.java
Wed Feb 22 17:35:37 2012
@@ -6,4 +6,4 @@ public class LowercasingPasswordFactory 
 		return password.toLowerCase();
 	}
 
-};
+}

Modified: activemq/trunk/assembly/src/release/bin/activemq
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/bin/activemq?rev=1292413&r1=1292412&r2=1292413&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/bin/activemq (original)
+++ activemq/trunk/assembly/src/release/bin/activemq Wed Feb 22 17:35:37 2012
@@ -104,6 +104,10 @@ if [ -z "$ACTIVEMQ_DATA" ] ; then
     ACTIVEMQ_DATA="$ACTIVEMQ_BASE/data"
 fi
 
+if [ -z "$ACTIVEMQ_TMP" ] ; then
+  ACTIVEMQ_TMP="$ACTIVEMQ_BASE/tmp"
+fi
+
 setCurrentUser(){
    CUSER=`whoami 2>/dev/null`
 
@@ -334,6 +338,7 @@ if [ "$OSTYPE" = "cygwin" ];then
   JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
   CYGHOME=`cygpath --windows "$HOME"`
+  ACTIVEMQ_TMP=`cygpath --windows "$ACTIVEMQ_TMP"`
   if [ -n "$CYGHOME" ]; then
       ACTIVEMQ_CYGWIN="-Dcygwin.user.home=\"$CYGHOME\""
   fi
@@ -382,6 +387,7 @@ invokeJar(){
               -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
               -Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
               -Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
+              -Djava.io.tmpdir=\"${ACTIVEMQ_TMP}\" \
               $ACTIVEMQ_CYGWIN \
               -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS >/dev/null 2>&1
&
               RET=\"\$?\"; APID=\"\$!\";
@@ -396,6 +402,7 @@ invokeJar(){
               -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
               -Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
               -Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
+              -Djava.io.tmpdir=\"${ACTIVEMQ_TMP}\" \
               $ACTIVEMQ_CYGWIN \
               -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS --pid $PID &
               RET=\"\$?\"; APID=\"\$!\";
@@ -408,6 +415,7 @@ invokeJar(){
               -Dactivemq.base=\"${ACTIVEMQ_BASE}\" \
               -Dactivemq.conf=\"${ACTIVEMQ_CONF}\" \
               -Dactivemq.data=\"${ACTIVEMQ_DATA}\" \
+              -Djava.io.tmpdir=\"${ACTIVEMQ_TMP}\" \
               $ACTIVEMQ_CYGWIN \
               -jar \"${ACTIVEMQ_HOME}/bin/run.jar\" $COMMANDLINE_ARGS" $DOIT_POSTFIX
       RET="$?"

Modified: activemq/trunk/assembly/src/release/bin/activemq-admin
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/bin/activemq-admin?rev=1292413&r1=1292412&r2=1292413&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/bin/activemq-admin (original)
+++ activemq/trunk/assembly/src/release/bin/activemq-admin Wed Feb 22 17:35:37 2012
@@ -116,6 +116,10 @@ if [ -z "$ACTIVEMQ_BASE" ] ; then
   ACTIVEMQ_BASE="$ACTIVEMQ_HOME"
 fi
 
+if [ -z "$ACTIVEMQ_TMP" ] ; then
+  ACTIVEMQ_TMP="$ACTIVEMQ_BASE/tmp"
+fi
+
 # Active MQ configuration directory
 if [ -z "$ACTIVEMQ_CONF" ] ; then
   ACTIVEMQ_CONF="$ACTIVEMQ_BASE/conf"
@@ -132,6 +136,7 @@ if $cygwin; then
   ACTIVEMQ_BASE=`cygpath --windows "$ACTIVEMQ_BASE"`
   ACTIVEMQ_CONF=`cygpath --windows "$ACTIVEMQ_CONF"`
   ACTIVEMQ_DATA=`cygpath --windows "$ACTIVEMQ_DATA"`
+  ACTIVEMQ_TMP=`cygpath --windows "$ACTIVEMQ_TMP"`
   ACTIVEMQ_CLASSPATH=`cygpath --path --windows "$ACTIVEMQ_CLASSPATH"`
   JAVA_HOME=`cygpath --windows "$JAVA_HOME"`
   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
@@ -161,7 +166,7 @@ fi
 #ACTIVEMQ_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
 
 if [ -n "$CYGHOME" ]; then
-    exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}"
-Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dactivemq.conf="${ACTIVEMQ_CONF}"
-Dactivemq.data="${ACTIVEMQ_DATA}" -Dcygwin.user.home="$CYGHOME" -jar "${ACTIVEMQ_HOME}/bin/run.jar"
$@
+    exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}"
-Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dactivemq.conf="${ACTIVEMQ_CONF}"
-Dactivemq.data="${ACTIVEMQ_DATA}" -Djava.io.tmpdir="${ACTIVEMQ_TMP}" -Dcygwin.user.home="$CYGHOME"
-jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
 else
-    exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}"
-Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dactivemq.conf="${ACTIVEMQ_CONF}"
-Dactivemq.data="${ACTIVEMQ_DATA}" -jar "${ACTIVEMQ_HOME}/bin/run.jar" $@
+    exec "$JAVACMD" $ACTIVEMQ_OPTS $ACTIVEMQ_DEBUG_OPTS -Dactivemq.classpath="${ACTIVEMQ_CLASSPATH}"
-Dactivemq.home="${ACTIVEMQ_HOME}" -Dactivemq.base="${ACTIVEMQ_BASE}" -Dactivemq.conf="${ACTIVEMQ_CONF}"
-Dactivemq.data="${ACTIVEMQ_DATA}" -Djava.io.tmpdir="${ACTIVEMQ_TMP}" -jar "${ACTIVEMQ_HOME}/bin/run.jar"
$@
 fi

Modified: activemq/trunk/assembly/src/release/bin/activemq-admin.bat
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/bin/activemq-admin.bat?rev=1292413&r1=1292412&r2=1292413&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/bin/activemq-admin.bat (original)
+++ activemq/trunk/assembly/src/release/bin/activemq-admin.bat Wed Feb 22 17:35:37 2012
@@ -75,6 +75,8 @@ if "%ACTIVEMQ_CONF%" == "" set ACTIVEMQ_
 
 if "%ACTIVEMQ_DATA%" == "" set ACTIVEMQ_DATA=%ACTIVEMQ_HOME%\data
 
+if "%ACTIVEMQ_TMP%" == "" set ACTIVEMQ_TMP=%ACTIVEMQ_DATA%\tmp
+
 if /i not "%1" == "start" goto debugOpts
 
 
@@ -93,7 +95,7 @@ REM SET ACTIVEMQ_DEBUG_OPTS=-Xdebug -Xno
 
 REM Setup ActiveMQ Classpath. Default is the conf directory.
 set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_CONF%;%ACTIVEMQ_DATA%;%ACTIVEMQ_CLASSPATH%
-"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%"
-Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -Dactivemq.data="%ACTIVEMQ_DATA%"
-Dactivemq.conf="%ACTIVEMQ_CONF%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" %*
+"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%"
-Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -Dactivemq.data="%ACTIVEMQ_DATA%"
-Djava.io.tmpdir="%ACTIVEMQ_TMP%" -Dactivemq.conf="%ACTIVEMQ_CONF%" -jar "%ACTIVEMQ_HOME%/bin/run.jar"
%*
 
 goto end
 

Modified: activemq/trunk/assembly/src/release/bin/activemq.bat
URL: http://svn.apache.org/viewvc/activemq/trunk/assembly/src/release/bin/activemq.bat?rev=1292413&r1=1292412&r2=1292413&view=diff
==============================================================================
--- activemq/trunk/assembly/src/release/bin/activemq.bat (original)
+++ activemq/trunk/assembly/src/release/bin/activemq.bat Wed Feb 22 17:35:37 2012
@@ -75,6 +75,8 @@ if "%ACTIVEMQ_CONF%" == "" set ACTIVEMQ_
 
 if "%ACTIVEMQ_DATA%" == "" set ACTIVEMQ_DATA=%ACTIVEMQ_HOME%\data
 
+if "%ACTIVEMQ_TMP%" == "" set ACTIVEMQ_TMP=%ACTIVEMQ_DATA%\tmp
+
 if "%ACTIVEMQ_OPTS%" == "" set ACTIVEMQ_OPTS=-Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties
 
 if "%SUNJMX%" == "" set SUNJMX=-Dcom.sun.management.jmxremote
@@ -90,7 +92,7 @@ REM Setup ActiveMQ Classpath.
 REM Add instance conf dir before AMQ install conf dir to pick up instance-specific classpath
entries first
 set ACTIVEMQ_CLASSPATH=%ACTIVEMQ_CONF%;%ACTIVEMQ_BASE%/conf;%ACTIVEMQ_HOME%/conf;%ACTIVEMQ_CLASSPATH%
 
-"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%"
-Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -Dactivemq.conf="%ACTIVEMQ_CONF%"
-Dactivemq.data="%ACTIVEMQ_DATA%" -jar "%ACTIVEMQ_HOME%/bin/run.jar" start %*
+"%_JAVACMD%" %SUNJMX% %ACTIVEMQ_DEBUG_OPTS% %ACTIVEMQ_OPTS% %SSL_OPTS% -Dactivemq.classpath="%ACTIVEMQ_CLASSPATH%"
-Dactivemq.home="%ACTIVEMQ_HOME%" -Dactivemq.base="%ACTIVEMQ_BASE%" -Dactivemq.conf="%ACTIVEMQ_CONF%"
-Dactivemq.data="%ACTIVEMQ_DATA%" -Djava.io.tmpdir="%ACTIVEMQ_TMP%" -jar "%ACTIVEMQ_HOME%/bin/run.jar"
start %*
 
 goto end
 



Mime
View raw message