return omElement;
} catch (FileNotFoundException e) {
String errorMessage = CEPConstants.CEP_CONF
+ "cannot be found in the path : " + path;
log.error(errorMessage, e);
throw new CEPConfigurationException(errorMessage, e);
} catch (XMLStreamException e) {
String errorMessage = "Invalid XML for " + CEPConstants.CEP_CONF
+ " located in the path : " + path;
log.error(errorMessage, e);
throw new CEPConfigurationException(errorMessage, e);
} finally {
try {
if (inputStream != null) {
inputStream.close();
}
} catch (IOException e) {
String errorMessage = "Can not close the input stream";
log.error(errorMessage, e);
throw new CEPConfigurationException(errorMessage, e);
}
}
}