Source:
<code>public void retrieveAndPersistFailedEventQueueReports() { ConcurFailedEventQueueProcessingController controller = findCOncurFailedEventQueueProcessingController(); LOG.info("retrieveAndPersistFailedEventQueueReports, ConcurFailedEventQueueProcessingController name: " + controller.toString()); if (controller.queryFailedEventQueue) { ConcurEventNotificationListDTO notificationList = getConcurReportsService().retrieveFailedEventQueueNotificationsFromConcur(); if (controller.logFailedEventQueue) { <START> String notificationListString = getConcurReportsService().retrieveFailedEventQueueNotificationsFromConcurAsString(); <END> LOG.info("retrieveAndPersistFailedEventQueueReports, notificationListString: " + notificationListString); } if (controller.writeFailedEventQueue) { if (areThereNotificationsToProcess(notificationList)) { LOG.info("retrieveAndPersistFailedEventQueueReports, found " + notificationList.getConcurEventNotificationDTOs().size() + " failed events to process."); for (ConcurEventNotificationDTO concurEventNotificationDTO : notificationList.getConcurEventNotificationDTOs()) { try { ConcurEventNotification concurEventNotification = getConcurEventNotificationConversionService().convertConcurEventNotification(concurEventNotificationDTO); saveConcurEventNotification(concurEventNotification); getConcurReportsService().deleteFailedEventQueueItemInConcur(findNotificationId(concurEventNotification.getNotificationURI())); } catch (ParseException e) { LOG.error("retrieveAndPersistFailedEventQueueReports, error trying to save items: " + e.getMessage(), e); } } } else { LOG.info("retrieveAndPersistFailedEventQueueReports, There were no failed events to process."); } } else { LOG.info("retrieveAndPersistFailedEventQueueReports, persisting failed event queue items is turned off."); } } else { LOG.info("retrieveAndPersistFailedEventQueueReports, failed event queue processing is turned off."); } }</code><technical_language>In this setup, log-only configuration retrieving failed event queue twice: a DTO a String. log-only mode avoid this ways? do need log-only setup test unmarshalling of XML? NOTE: If in code snippet above, a lines earlier in file DTO retrieval is happening</technical_language>

Target:
public void retrieveAndPersistFailedEventQueueReports() { ConcurFailedEventQueueProcessingMode processingMode = findConcurFailedEventQueueProcessingMode(); LOG.info("retrieveAndPersistFailedEventQueueReports, processingMode: " + processingMode.toString()); if (processingMode.queryQueue) { ConcurEventNotificationListDTO notificationList = getConcurReportsService().retrieveFailedEventQueueNotificationsFromConcur(); if (processingMode.logQueue) { String notificationListString = getConcurReportsService().retrieveFailedEventQueueNotificationsFromConcurAsString(); LOG.info("retrieveAndPersistFailedEventQueueReports, notificationListString: " + notificationListString); } if (processingMode.persistQueue) { if (areThereNotificationsToProcess(notificationList)) { LOG.info("retrieveAndPersistFailedEventQueueReports, found " + notificationList.getConcurEventNotificationDTOs().size() + " failed events to process."); for (ConcurEventNotificationDTO concurEventNotificationDTO : notificationList.getConcurEventNotificationDTOs()) { try { ConcurEventNotification concurEventNotification = getConcurEventNotificationConversionService().convertConcurEventNotification(concurEventNotificationDTO); saveConcurEventNotification(concurEventNotification); getConcurReportsService().deleteFailedEventQueueItemInConcur(findNotificationId(concurEventNotification.getNotificationURI())); } catch (ParseException e) { LOG.error("retrieveAndPersistFailedEventQueueReports, error trying to save items: " + e.getMessage(), e); } } } else { LOG.info("retrieveAndPersistFailedEventQueueReports, There were no failed events to process."); } } else { LOG.info("retrieveAndPersistFailedEventQueueReports, persisting failed event queue items is turned off."); } } else { LOG.info("retrieveAndPersistFailedEventQueueReports, failed event queue processing is turned off."); } }