Addressing review comments

revert-70ac1926
Ace 4 years ago
parent 4df57ede61
commit 5531bc0140

@ -264,8 +264,10 @@ public class OperationMappingDAOImpl implements OperationMappingDAO {
} }
} }
} catch (SQLException e) { } catch (SQLException e) {
throw new OperationManagementDAOException("Error occurred while fetching pending operation mappings for " + String msg = "Error occurred while fetching pending operation mappings for " +
"active devices of type '" + deviceTypeId + "'", e); "active devices of type '" + deviceTypeId + "'";
log.error(msg, e);
throw new OperationManagementDAOException(msg, e);
} }
return enrolmentOperationMappingList; return enrolmentOperationMappingList;
} }

@ -62,29 +62,6 @@ public final class HeartBeatBeaconDAOUtil {
} }
} }
/**
* Cleanup resources used to transaction
*
* @param stmt Statement used
* @param rs Obtained results set
*/
public static void cleanupResources(Statement stmt, ResultSet rs) {
if (rs != null) {
try {
rs.close();
} catch (SQLException e) {
log.warn("Error occurred while closing result set", e);
}
}
if (stmt != null) {
try {
stmt.close();
} catch (SQLException e) {
log.warn("Error occurred while closing prepared statement", e);
}
}
}
/** /**
* Lookup datasource using name and jndi properties * Lookup datasource using name and jndi properties
* *

@ -85,6 +85,7 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic
} }
} else { } else {
String msg = "Heart Beat Configuration Disabled. Server Context Information Not available."; String msg = "Heart Beat Configuration Disabled. Server Context Information Not available.";
log.error(msg);
throw new HeartBeatManagementException(msg); throw new HeartBeatManagementException(msg);
} }
return serverCtxInfo; return serverCtxInfo;
@ -129,6 +130,7 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic
} }
} else { } else {
String msg = "Heart Beat Configuration Disabled. Updating Server Context Failed."; String msg = "Heart Beat Configuration Disabled. Updating Server Context Failed.";
log.error(msg);
throw new HeartBeatManagementException(msg); throw new HeartBeatManagementException(msg);
} }
return uuid; return uuid;
@ -161,6 +163,7 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic
} }
} else { } else {
String msg = "Heart Beat Configuration Disabled. Error occurred while checking if server is qualified to execute randomly designated task."; String msg = "Heart Beat Configuration Disabled. Error occurred while checking if server is qualified to execute randomly designated task.";
log.error(msg);
throw new HeartBeatManagementException(msg); throw new HeartBeatManagementException(msg);
} }
return isQualified; return isQualified;
@ -204,6 +207,7 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic
} }
} else { } else {
String msg = "Heart Beat Configuration Disabled. Updating acknowledged task list failed."; String msg = "Heart Beat Configuration Disabled. Updating acknowledged task list failed.";
log.error(msg);
throw new HeartBeatManagementException(msg); throw new HeartBeatManagementException(msg);
} }
return result; return result;
@ -245,6 +249,7 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic
} }
} else { } else {
String msg = "Heart Beat Configuration Disabled. Error electing candidate for dynamic task execution."; String msg = "Heart Beat Configuration Disabled. Error electing candidate for dynamic task execution.";
log.error(msg);
throw new HeartBeatManagementException(msg); throw new HeartBeatManagementException(msg);
} }
} }

Loading…
Cancel
Save