import org.argeo.slc.msg.test.tree.CloseTreeTestResultRequest;
import org.argeo.slc.msg.test.tree.CreateTreeTestResultRequest;
import org.argeo.slc.msg.test.tree.ResultPartRequest;
-import org.argeo.slc.test.TestResultListener;
import org.argeo.slc.test.TestResultPart;
+import org.springframework.jms.JmsException;
import org.springframework.jms.core.JmsTemplate;
public class JmsTreeTestResultListener implements TreeTestResultListener {
private Destination executionEventDestination;
- // private Destination createDestination;
- // private Destination addResultPartDestination;
- // private Destination closeDestination;
-
public void resultPartAdded(TreeTestResult testResult,
TestResultPart testResultPart) {
if (onlyOnClose)
jmsTemplate.convertAndSend(executionEventDestination, req);
}
+ } catch (JmsException e) {
+ log.warn("Could not notify result part to server: "
+ + e.getMessage());
+ if (log.isTraceEnabled())
+ log.debug("Original error.", e);
} catch (Exception e) {
throw new SlcException("Could not notify to JMS", e);
}
jmsTemplate.convertAndSend(executionEventDestination, req);
}
+ } catch (JmsException e) {
+ log.warn("Could not notify result close to server: "
+ + e.getMessage());
+ if (log.isTraceEnabled())
+ log.debug("Original error.", e);
} catch (Exception e) {
throw new SlcException("Could not notify to JMS", e);
}
req.setAttachment((SimpleAttachment) attachment);
jmsTemplate.convertAndSend(executionEventDestination, req);
+ } catch (JmsException e) {
+ log
+ .warn("Could not notify attachment to server: "
+ + e.getMessage());
+ if (log.isTraceEnabled())
+ log.debug("Original error.", e);
} catch (Exception e) {
throw new SlcException("Could not notify to JMS", e);
}