use of org.opennms.netmgt.xml.eventconf.EnterpriseIdPartition in project opennms by OpenNMS.
the class MockEventConfDao method reload.
@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);
}
}
Aggregations