Skip to content

Commit

Permalink
Implemented NAS-2484 - trivial (only logging involved)
Browse files Browse the repository at this point in the history
  • Loading branch information
svcarlsen committed Jan 22, 2016
1 parent c91c9d7 commit 7df0e13
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public synchronized HeritrixTemplate read(String orderXmlName) {
ArgumentNotValid.checkNotNullOrEmpty(orderXmlName, "String orderXmlName");
Connection c = HarvestDBConnection.get();
PreparedStatement s = null;
log.debug("Reading template {} from database");
try {
s = c.prepareStatement("SELECT template_id, orderxml, isActive FROM ordertemplates WHERE name = ?");
s.setString(1, orderXmlName);
Expand All @@ -90,10 +91,8 @@ public synchronized HeritrixTemplate read(String orderXmlName) {
orderTemplateReader = clob.getCharacterStream();
} else {
String string = res.getString(2);
// log.debug("clob=" + string);
orderTemplateReader = new StringReader(string);
}
System.out.println("Calling HeritrixTemplate.read() w/ arg:" + orderTemplateReader);
HeritrixTemplate heritrixTemplate = HeritrixTemplate.read(template_id, orderTemplateReader);
heritrixTemplate.setIsActive(res.getBoolean(3));
return heritrixTemplate;
Expand All @@ -102,12 +101,6 @@ public synchronized HeritrixTemplate read(String orderXmlName) {
+ ExceptionUtils.getSQLExceptionCause(e);
log.warn(message, e);
throw new IOFailure(message, e);
/*
} catch (DocumentException e) {
final String message = "Error parsing order.xml string for " + orderXmlName;
log.warn(message, e);
throw new IOFailure(message, e);
*/
}
finally {
DBUtils.closeStatementIfOpen(s);
Expand Down

0 comments on commit 7df0e13

Please sign in to comment.