Ignore:
Timestamp:
2014-10-10T16:59:53+13:00 (10 years ago)
Author:
ak19
Message:

Fix to recent commit that made GS3ServerThread.java do a Process.waitFor(). JRE6 is included in GS binaries. But Java 6 does not work with Process.WaitFor() in GS3ServerThread, as the GS3 server waits to start until after GLI has been quit. Java 7 (JDK and JRE 7) work fine with this. To get Java 6 to work, need to handle the IOstreams of the Process launched by GS3ServerThread. Using the StreamGobbler classes for this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r29222 r29361  
    17551755        GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
    17561756        thread.start();
    1757 
    1758         // sleep before returning and doing the configGS3Server: give the GS3 server time to restart   
    1759         try {
    1760             Thread.sleep(5000);
    1761         } catch(Exception e) {
    1762             e.printStackTrace();
    1763         }
     1757       
     1758        // Give the GS3 server time to restart:
     1759        // the GS3ServerThread above waits for the process to terminate. ant restart target calls the start-tomcat ant target
     1760        // and that takes waits 5 seconds and polls to see if a GS3 server index page has loaded. So no need to sleep here     
    17641761       
    17651762        }
     
    20382035        return true;
    20392036    }
    2040 
    2041     if(CollectionManager.isSolrCollection()) {
    2042         // No installCollection() for GS3 solr collection: activate will take care of that
    2043         DebugStream.println("Solr collection build complete: building already moved to index by activate.pl.");
    2044 
    2045         // Finished building,
    2046         // For now, for a GS3 solr collection, we'd have stopped the GS3 server before building
    2047         // and will now need to restart it.
    2048         GS3ServerThread thread = new GS3ServerThread(Configuration.gsdl3_src_path, "restart");
    2049         thread.start();
    2050 
    2051         return true;
    2052     }
    2053 
    20542037
    20552038    DebugStream.println("Build complete. Moving files.");
Note: See TracChangeset for help on using the changeset viewer.