Skip to content
Snippets Groups Projects
Commit 425d77e9 authored by gmantele's avatar gmantele
Browse files

[UWS] Cancel last commit. The UWSException was thrown intentionnaly: if an...

[UWS] Cancel last commit. The UWSException was thrown intentionnaly: if an error occurs while just creating the thread, this error should not impact the job ; it is an internal server error, not an error due to the job execution or of a wrong parameter. This error MUST be thrown AND the job MUST stay PENDING (so that it can be restarted later when the server bug will be fixed). Job parameters checks MUST be done either in the job execution (JobThread.jobWork()) or at the job creation (using an InputParamController).
parent 0740c8b7
No related branches found
No related tags found
No related merge requests found
...@@ -119,7 +119,7 @@ import uws.service.log.UWSLog.LogLevel; ...@@ -119,7 +119,7 @@ import uws.service.log.UWSLog.LogLevel;
* </ul> * </ul>
* *
* @author Gr&eacute;gory Mantelet (CDS;ARI) * @author Gr&eacute;gory Mantelet (CDS;ARI)
* @version 4.1 (11/2014) * @version 4.1 (10/2014)
*/ */
public class UWSJob extends SerializableUWSObject { public class UWSJob extends SerializableUWSObject {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -1151,14 +1151,9 @@ public class UWSJob extends SerializableUWSObject { ...@@ -1151,14 +1151,9 @@ public class UWSJob extends SerializableUWSObject {
}// Otherwise start directly the execution: }// Otherwise start directly the execution:
else{ else{
// Create its corresponding thread: // Create its corresponding thread:
try{
thread = getFactory().createJobThread(this); thread = getFactory().createJobThread(this);
if (thread == null) if (thread == null)
throw new NullPointerException("Missing job work ! The thread created by the factory is NULL => The job can't be executed !"); throw new NullPointerException("Missing job work ! The thread created by the factory is NULL => The job can't be executed !");
}catch(UWSException ue){
setPhase(ExecutionPhase.ERROR);
throw ue;
}
// Change the job phase: // Change the job phase:
setPhase(ExecutionPhase.EXECUTING); setPhase(ExecutionPhase.EXECUTING);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment