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%2FJcrResultListener.java;h=068c6d8f065597fe0d4c1bb59c719db42cac5416;hb=699640c58cc0578beebfc3edd00dac9eed65ee0b;hp=db575885fb9f51deafd4404a52c4ecd753bb8d7c;hpb=9760d81bd6eab3df9eeee48e8e82841d9cb694e5;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrResultListener.java b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrResultListener.java index db575885f..068c6d8f0 100644 --- a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrResultListener.java +++ b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrResultListener.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2007-2012 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.argeo.slc.jcr.execution; import java.util.Collections; @@ -31,7 +46,11 @@ import org.argeo.slc.jcr.SlcTypes; import org.argeo.slc.test.TestResultPart; import org.argeo.slc.test.TestStatus; -/** Persists results in JCR */ +/** + * Persists results in JCR by listening to {@link TreeTestResult}. This is to + * facilitate transition from legacy approaches and should not be used in new + * implementations. + */ public class JcrResultListener implements TreeTestResultListener, SlcNames { private final static Log log = LogFactory.getLog(JcrResultListener.class); @@ -174,6 +193,9 @@ public class JcrResultListener implements TreeTestResultListener, SlcNames { uuidToIdentifier.remove(uuid); session.save(); + + if (log.isDebugEnabled()) + log.debug("Closed test result " + uuid); } catch (RepositoryException e) { JcrUtils.discardQuietly(session); log.error("Cannot close result " + testResult, e);