Changeset 22678
- Timestamp:
- 2010-08-18T21:26:45+12:00 (14 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r22605 r22678 424 424 ProfileXMLFileManager.clearProfileXMLFile(); 425 425 426 // If we're using the Local Library we must release the collection before writing to the collect.cfg file 427 if(Gatherer.isLocalLibrary) { 428 LocalLibraryServer.releaseCollection(collection.getName()); 429 } 430 426 431 collection.destroy(); 427 432 collection = null; -
main/trunk/gli/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java
r22661 r22678 1 /** 1 2 /** 2 3 *############################################################################ … … 48 49 static final private String RELEASE_COMMAND = "?a=config&cmd=release-collection&c="; 49 50 static final private String QUIT_COMMAND = "?a=config&cmd=kill"; 51 static final private String RESTART_COMMAND = "?a=config&cmd=restart"; 50 52 51 53 static private LLSSiteConfig llssite_cfg_file = null; … … 295 297 * the web server launched by GLI. */ 296 298 static public void reconfigure() { 297 if(isPersistentServer) { 298 System.err.println("***** Reconfigure is not yet implemented for server.exe"); 299 if(isPersistentServer) { 300 // 1st: server may have nulled URL if server was stopped inbetween, 301 // so load that new URL, if GLI conf file modified 302 // Then put the new collectDir into the GLI configfile being used 303 llssite_cfg_file.load(true); 304 305 String collectDir = Gatherer.getCollectDirectoryPath(); 306 collectDir = collectDir.substring(0, collectDir.length()-1); // remove file separator at end 307 llssite_cfg_file.put(LLSSiteConfig.COLLECTHOME, collectDir); 308 llssite_cfg_file.save(); 309 310 // tell the server to restart, so it will read the new configuration 311 312 // (1) need a server to be running in order for us to send a restart message to it 313 if(checkServerRunning()) { // if true, it wasn't running before, but has now restarted the server. We're done 314 return; 315 } 316 // (2) otherwise the server may already have been running, need to tell it to restart after setting the collect dir 317 if(running) { 318 config(RESTART_COMMAND); 319 } 299 320 return; 300 321 } … … 650 671 static final private String TRUE = "1"; 651 672 static final private String URL = "url"; 652 673 static final private String COLLECTHOME = "collecthome"; 674 653 675 static final public String URL_PENDING = "URL_pending"; 654 676 … … 850 872 put(key, value); 851 873 } 852 in.close(); 874 875 in.close(); 853 876 } 854 877 catch (Exception error) {
Note:
See TracChangeset
for help on using the changeset viewer.