Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/wsplgen/JobExecutor.java @ 1128:727c53fd0dc7
Some bugfixes when starting/finishing WSPLGEN jobs.
flys-artifacts/trunk@2643 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 05 Sep 2011 07:17:52 +0000 |
parents | 6b9877a9f6c1 |
children | e6dd52342eb7 |
comparison
equal
deleted
inserted
replaced
1127:6b9877a9f6c1 | 1128:727c53fd0dc7 |
---|---|
3 import java.io.InputStream; | 3 import java.io.InputStream; |
4 import java.io.IOException; | 4 import java.io.IOException; |
5 import java.io.File; | 5 import java.io.File; |
6 | 6 |
7 import org.apache.log4j.Logger; | 7 import org.apache.log4j.Logger; |
8 | |
9 import de.intevation.artifacts.CallContext; | |
8 | 10 |
9 import de.intevation.flys.artifacts.model.WSPLGENJob; | 11 import de.intevation.flys.artifacts.model.WSPLGENJob; |
10 | 12 |
11 | 13 |
12 public class JobExecutor { | 14 public class JobExecutor { |
70 try { | 72 try { |
71 observer.join(); | 73 observer.join(); |
72 } | 74 } |
73 catch (InterruptedException iee) { /* do nothing */ } | 75 catch (InterruptedException iee) { /* do nothing */ } |
74 | 76 |
77 job.getCallContext().afterBackground(CallContext.STORE); | |
78 | |
75 logger.info("WSPLGEN exit value: " + process.exitValue()); | 79 logger.info("WSPLGEN exit value: " + process.exitValue()); |
76 | 80 |
77 return; | 81 return; |
78 } | 82 } |
79 } | 83 } |
80 catch (SecurityException se) { | 84 catch (SecurityException se) { |
81 errorMsg = se.getMessage(); | 85 logger.error(se); |
82 } | 86 } |
83 catch (IOException ioe) { | 87 catch (IOException ioe) { |
84 errorMsg = ioe.getMessage(); | 88 logger.error(ioe); |
85 } | 89 } |
86 catch (NullPointerException npe) { | 90 catch (NullPointerException npe) { |
87 errorMsg = npe.getMessage(); | 91 logger.error(npe, npe); |
88 } | 92 } |
89 catch (IndexOutOfBoundsException ioobe) { | 93 catch (IndexOutOfBoundsException ioobe) { |
90 errorMsg = ioobe.getMessage(); | 94 logger.error(ioobe, ioobe); |
91 } | 95 } |
92 | |
93 logger.error("An error occured while starting WSPLGEN: " + errorMsg); | |
94 } | 96 } |
95 } | 97 } |
96 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 98 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |