private <T extends XmlObject> T getAndParseDocumentFromL2(String message, String httpPath, FactoryParser<T> factoryParser) throws ConfigurationSetupException { int tries = 0; while (true) { InputStream in = getPropertiesFromServerViaHttp(message, httpPath); try { try { return new ParseXmlObjectStream<T>().parse(message, in, factoryParser); } catch (SAXParseException e) { if (tries++ < 10) { logger.warn("Got an XML parse exception retrieving L1 reconnect properties. Retrying..."); continue; } else { throw e; } } } catch (Exception e) { consoleLogger.error(e.getMessage()); logger.error(e); throw new AssertionError(e); } } }
private <T extends XmlObject> T getAndParseDocumentFromL2(String message, String httpPath, FactoryParser<T> factoryParser) throws ConfigurationSetupException { int tries = 0; while (true) { InputStream in = getPropertiesFromServerViaHttp(message, httpPath); try { try { return new ParseXmlObjectStream<T>().parse(message, in, factoryParser); } catch (SAXParseException e) { if (tries++ < 10) { logger.warn("Got an XML parse exception retrieving L1 reconnect properties. Retrying..."); continue; } else { throw e; } } } catch (Exception e) { consoleLogger.error(e.getMessage()); logger.error(e); throw new AssertionError(e); } } }
private <T extends XmlObject> T getAndParseDocumentFromL2(String message, String httpPath, FactoryParser<T> factoryParser) throws ConfigurationSetupException { int tries = 0; while (true) { InputStream in = getPropertiesFromServerViaHttp(message, httpPath); try { try { return new ParseXmlObjectStream<T>().parse(message, in, factoryParser); } catch (SAXParseException e) { if (tries++ < 10) { logger.warn("Got an XML parse exception retrieving L1 reconnect properties. Retrying..."); continue; } else { throw e; } } } catch (Exception e) { consoleLogger.error(e.getMessage()); logger.error(e); throw new AssertionError(e); } } }