X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fjcr%2Fexecution%2FJcrExecutionProcess.java;h=526b5ebc4e5fb10add998c3b635088423dd59031;hb=6ced86c7baa54ed65d2bb2d7df6664a2dc47450c;hp=ce08b8f38136d432617b8b7e8abcb2d145c82143;hpb=9bab32638cc6a08ba96c3feca190733e9d1ac0ac;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrExecutionProcess.java b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrExecutionProcess.java index ce08b8f38..526b5ebc4 100644 --- a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrExecutionProcess.java +++ b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrExecutionProcess.java @@ -3,6 +3,8 @@ package org.argeo.slc.jcr.execution; import javax.jcr.Node; import javax.jcr.RepositoryException; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; import org.argeo.slc.execution.ExecutionProcess; @@ -10,6 +12,7 @@ import org.argeo.slc.jcr.SlcNames; /** Execution process implementation based on a JCR node. */ public class JcrExecutionProcess implements ExecutionProcess { + private Log log = LogFactory.getLog(JcrExecutionProcess.class); private final Node node; public JcrExecutionProcess(Node node) { @@ -28,7 +31,11 @@ public class JcrExecutionProcess implements ExecutionProcess { try { return node.getProperty(SlcNames.SLC_STATUS).getString(); } catch (RepositoryException e) { - throw new SlcException("Cannot get uuid for " + node, e); + log.error("Cannot get status: " + e); + // we should re-throw exception because this information can + // probably used for monitoring in case there are already unexpected + // exceptions + return UNKOWN; } } @@ -45,7 +52,10 @@ public class JcrExecutionProcess implements ExecutionProcess { } catch (RepositoryException e1) { // silent } - throw new SlcException("Cannot get uuid for " + node, e); + // we should re-throw exception because this information can + // probably used for monitoring in case there are already unexpected + // exceptions + log.error("Cannot set status " + status + ": " + e); } }