# HG changeset patch # User Ingo Weinzierl # Date 1315207072 0 # Node ID 727c53fd0dc7e6ff4c899e588b46bedaaf6c429d # Parent 6b9877a9f6c16e011a833c78880271d7463cb8f1 Some bugfixes when starting/finishing WSPLGEN jobs. flys-artifacts/trunk@2643 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 6b9877a9f6c1 -r 727c53fd0dc7 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Fri Sep 02 13:12:05 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon Sep 05 07:17:52 2011 +0000 @@ -1,3 +1,16 @@ +2011-09-05 Ingo Weinzierl + + * src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java: + Bugfixed broken attribute assignment. + + * src/main/java/de/intevation/flys/wsplgen/JobExecutor.java: Call + CallContext.afterBackground() after a WSPLGEN job has finished to remove + the background lock from Artifact. + + * src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java: + Call CallContext.afterCall(BACKGROUND) to lock the Artifact for + background processing. + 2011-09-02 Ingo Weinzierl * src/main/java/de/intevation/flys/wsplgen/JobExecutor.java: New. This diff -r 6b9877a9f6c1 -r 727c53fd0dc7 flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java Fri Sep 02 13:12:05 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENJob.java Mon Sep 05 07:17:52 2011 +0000 @@ -50,7 +50,7 @@ public WSPLGENJob(FLYSArtifact flys, File workingDir, CallContext context) { this.artifact = flys; this.workingDir = workingDir; - this.callContext = callContext; + this.callContext = context; out = -1; start = Double.NaN; diff -r 6b9877a9f6c1 -r 727c53fd0dc7 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Fri Sep 02 13:12:05 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Mon Sep 05 07:17:52 2011 +0000 @@ -116,7 +116,7 @@ facets.add(new WSPLGENFacet(0, FLOODMAP_WSPLGEN, "WSPLGEN")); - //context.afterCall(CallContext.BACKGROUND); + context.afterCall(CallContext.BACKGROUND); return null; } diff -r 6b9877a9f6c1 -r 727c53fd0dc7 flys-artifacts/src/main/java/de/intevation/flys/wsplgen/JobExecutor.java --- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/JobExecutor.java Fri Sep 02 13:12:05 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/JobExecutor.java Mon Sep 05 07:17:52 2011 +0000 @@ -6,6 +6,8 @@ import org.apache.log4j.Logger; +import de.intevation.artifacts.CallContext; + import de.intevation.flys.artifacts.model.WSPLGENJob; @@ -72,25 +74,25 @@ } catch (InterruptedException iee) { /* do nothing */ } + job.getCallContext().afterBackground(CallContext.STORE); + logger.info("WSPLGEN exit value: " + process.exitValue()); return; } } catch (SecurityException se) { - errorMsg = se.getMessage(); + logger.error(se); } catch (IOException ioe) { - errorMsg = ioe.getMessage(); + logger.error(ioe); } catch (NullPointerException npe) { - errorMsg = npe.getMessage(); + logger.error(npe, npe); } catch (IndexOutOfBoundsException ioobe) { - errorMsg = ioobe.getMessage(); + logger.error(ioobe, ioobe); } - - logger.error("An error occured while starting WSPLGEN: " + errorMsg); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :