@Override public void reload() throws DataAccessException { InputStream is = null; InputStreamReader isr = null; try { is = m_resource.getInputStream(); isr = new InputStreamReader(is); final Reader reader = isr; m_events = JaxbUtils.unmarshal(Events.class, reader); m_events.loadEventFiles(m_resource); m_events.initialize(new EnterpriseIdPartition(), new EventOrdering()); } catch (final IOException e) { throw new DataRetrievalFailureException("Failed to read from " + m_resource.toString(), e); } finally { IOUtils.closeQuietly(isr); IOUtils.closeQuietly(is); } }
@Override public void reload() throws DataAccessException { InputStream is = null; InputStreamReader isr = null; try { is = m_resource.getInputStream(); isr = new InputStreamReader(is); final Reader reader = isr; m_events = JaxbUtils.unmarshal(Events.class, reader); m_events.loadEventFiles(m_resource); m_events.initialize(new EnterpriseIdPartition(), new EventOrdering()); } catch (final IOException e) { throw new DataRetrievalFailureException("Failed to read from " + m_resource.toString(), e); } finally { IOUtils.closeQuietly(isr); IOUtils.closeQuietly(is); } }
private synchronized void loadConfig() throws DataAccessException { try { Events events = JaxbUtils.unmarshal(Events.class, m_configResource); m_lastModifiedEventFiles = events.loadEventFiles(m_configResource); m_partition = new EnterpriseIdPartition(); events.initialize(m_partition, new EventOrdering()); m_events = events; } catch (Exception e) { throw new DataRetrievalFailureException("Unabled to load " + m_configResource, e); } }