You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by js...@apache.org on 2005/12/02 08:18:11 UTC

svn commit: r351619 - /geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java

Author: jsisson
Date: Thu Dec  1 23:18:01 2005
New Revision: 351619

URL: http://svn.apache.org/viewcvs?rev=351619&view=rev
Log:
GERONIMO-1267 - Startup processing should check that a temp directory configured in java.io.tmpdir exists before starting configurations

Modified:
    geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java

Modified: geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java?rev=351619&r1=351618&r2=351619&view=diff
==============================================================================
--- geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java (original)
+++ geronimo/trunk/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java Thu Dec  1 23:18:01 2005
@@ -195,6 +195,18 @@
 
     private void doStartup() {
         try {
+            // Check that the tmpdir exists - if not give friendly msg and exit
+            // since we allow it to be configured in geronimo.bat and geronimo.sh
+            // (since 1.0 release) the same way Tomcat allows it to be configured.
+            String tmpDir = System.getProperty("java.io.tmpdir");
+            if (tmpDir == null || (!(new File(tmpDir)).exists()) ||
+                    (!(new File(tmpDir)).isDirectory())) {
+                    System.err.println("The java.io.tmpdir system property specifies the "+
+                            "non-existent directory " +tmpDir);
+                    System.exit(1);
+                    throw new AssertionError();
+                }
+            
             // Determine the geronimo installation directory
             File geronimoInstallDirectory = DirectoryUtils.getGeronimoInstallDirectory();
             if (geronimoInstallDirectory == null) {