Changeset 18101

Show
Ignore:
Timestamp:
05.12.2008 14:05:54 (11 years ago)
Author:
ak19
Message:

Dr Nichols has changed this file so that stopping the tomcat server from start() (because it first calls stop()) no longer confuses the user with its 'stopping tomcat' message.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/server/Server.java

    r13907 r18101  
    8888        server_state = -1; 
    8989    server_control.updateControl(); 
    90     stop(); 
     90 
     91    server_control.displayMessage(dictionary.get("ServerControl.Starting")); 
     92    stop(true); // silent, no messages displayed 
    9193     
    9294    // reconfigure if necessary 
     
    105107    } 
    106108     
    107     server_control.displayMessage(dictionary.get("ServerControl.Starting")); 
    108109        state = runAnt(START_CMD); 
    109110 
     
    181182    } 
    182183 
     184    // Preserving the current behaviour of stop() which is to 
     185    // display the message on stopping 
    183186    public void stop() { 
    184          server_control.displayMessage(dictionary.get("ServerControl.Stopping")); 
    185      int state = runAnt(STOP_CMD); 
     187    stop(false); 
     188    } 
     189 
     190    public void stop(boolean silent) { 
     191    if(!silent) { 
     192        server_control.displayMessage(dictionary.get("ServerControl.Stopping")); 
     193    } 
     194    int state = runAnt(STOP_CMD); 
    186195     
    187196        if (state != RunAnt.SUCCESS){