+ public void addAttachment(TreeTestResult testResult, Attachment attachment) {
+ if (onlyOnClose)
+ return;
+
+ try {
+ AddTreeTestResultAttachmentRequest req = new AddTreeTestResultAttachmentRequest();
+ req.setResultUuid(testResult.getUuid());
+ 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);
+ }
+
+ }
+
+ /** Publishes the test result only when it gets closed. */