private long restartInternal ( long oldExecutionId , Properties restartParameters ) throws JobExecutionAlreadyCompleteException , NoSuchJobExecutionException , JobExecutionNotMostRecentException , JobRestartException , JobSecurityException { if ( authService != null ) { authService . authorizedJobRestartByExecution ( oldExecutionId ) ; } if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "JobOperator restart, with old executionId = " + oldExecutionId + "\n" + traceJobParameters ( restartParameters ) ) ; } //Check if there are no job executions and step executions running. BatchStatusValidator . validateStatusAtExecutionRestart ( oldExecutionId , restartParameters ) ; //Set instance state to submitted to be consistent with start long instanceId = getPersistenceManagerService ( ) . getJobInstanceIdFromExecutionId ( oldExecutionId ) ; getPersistenceManagerService ( ) . updateJobInstanceOnRestart ( instanceId , new Date ( ) ) ; WSJobExecution jobExecution = getPersistenceManagerService ( ) . createJobExecution ( instanceId , restartParameters , new Date ( ) ) ; long newExecutionId = getBatchKernelService ( ) . restartJob ( jobExecution . getExecutionId ( ) , restartParameters ) . getKey ( ) ; if ( logger . isLoggable ( Level . FINE ) ) { logger . fine ( "Restarted job with new executionId: " + newExecutionId + ", and old executionID: " + oldExecutionId ) ; } return newExecutionId ; }
Restart the given execution using the given jobparams .