Mercurial > dive4elements > framework
diff artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactCallContext.java @ 246:a8a06bbe306c
Added calls to call init/close for call contextes.
artifacts/trunk@1686 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 14 Apr 2011 11:18:10 +0000 |
parents | cabe4c02ab64 |
children | 3168af23aec5 |
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactCallContext.java Thu Apr 14 10:19:12 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactCallContext.java Thu Apr 14 11:18:10 2011 +0000 @@ -49,10 +49,9 @@ ArtifactDatabaseImpl artifactDatabase, int action, CallMeta callMeta, - Object context, PersistentArtifact artifact) { - super(artifactDatabase, action, callMeta, context); + super(artifactDatabase, action, callMeta); this.artifact = artifact; } @@ -84,23 +83,28 @@ * the return of the concrete artifact call. */ public void postCall() { - switch (action) { - case NOTHING: - break; - case TOUCH: - artifact.touch(); - break; - case STORE: - artifact.store(); - break; - case BACKGROUND: - logger.warn( - "BACKGROUND processing is not fully implemented, yet!"); - artifact.store(); - break; - default: - logger.error(INVALID_CALL_STATE + ": " + action); - throw new IllegalStateException(INVALID_CALL_STATE); + try { + switch (action) { + case NOTHING: + break; + case TOUCH: + artifact.touch(); + break; + case STORE: + artifact.store(); + break; + case BACKGROUND: + logger.warn( + "BACKGROUND processing is not fully implemented, yet!"); + artifact.store(); + break; + default: + logger.error(INVALID_CALL_STATE + ": " + action); + throw new IllegalStateException(INVALID_CALL_STATE); + } + } + finally { + super.postCall(); } } }