activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1376904 - /activemq/activemq-apollo/trunk/apollo-boot/src/main/java/org/apache/activemq/apollo/boot/Apollo.java
Date Fri, 24 Aug 2012 13:10:34 GMT
Author: chirino
Date: Fri Aug 24 13:10:33 2012
New Revision: 1376904

URL: http://svn.apache.org/viewvc?rev=1376904&view=rev
Log:
Set the java.io.tmpdir sys prop early in the boot process so that temp files can be extracted
to directory writable by the process.

Modified:
    activemq/activemq-apollo/trunk/apollo-boot/src/main/java/org/apache/activemq/apollo/boot/Apollo.java

Modified: activemq/activemq-apollo/trunk/apollo-boot/src/main/java/org/apache/activemq/apollo/boot/Apollo.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-boot/src/main/java/org/apache/activemq/apollo/boot/Apollo.java?rev=1376904&r1=1376903&r2=1376904&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-boot/src/main/java/org/apache/activemq/apollo/boot/Apollo.java
(original)
+++ activemq/activemq-apollo/trunk/apollo-boot/src/main/java/org/apache/activemq/apollo/boot/Apollo.java
Fri Aug 24 13:10:33 2012
@@ -87,6 +87,18 @@ public class Apollo {
            }
        }
 
+       String tempdir = System.getProperty("apollo.tempdir");
+       if( tempdir == null ) {
+           String base = System.getProperty("apollo.base");
+           if( base !=null ) {
+               tempdir = new File(base, "tmp").getCanonicalPath();
+           }
+       }
+
+       if( tempdir != null ) {
+           System.setProperty("java.io.tmpdir", tempdir);
+       }
+
        // Now setup our classloader..
        URLClassLoader loader = new URLClassLoader(urls.toArray(new URL[urls.size()]));
        Class<?> clazz = loader.loadClass(mainClass);



Mime
View raw message