private ReturnCode startStatusWait ( ServerLock lock ) { try { Thread . sleep ( BootstrapConstants . POLL_INTERVAL_MS ) ; } catch ( InterruptedException ex ) { Debug . printStackTrace ( ex ) ; return ReturnCode . ERROR_SERVER_START ; } // This method is only called if the server process was holding // the server lock. If this process is suddenly able to obtain the // lock, then the server process didn't finish starting. if ( ! lock . testServerRunning ( ) ) { return ReturnCode . ERROR_SERVER_START ; } return ReturnCode . START_STATUS_ACTION ; }
Wait a bit because the server process could not be contacted and then verify that the server process is still running .