}
} // ________________________________
protected List<Map<String, Object>> pollForCandidates() {
List<Map<String, Object>> oResults = new ArrayList<Map<String, Object>>();
final JdbcCleanConn oConn = getDbConn();
ResultSet RS = null;
try {
RS = oConn.execQueryWait(_PSscan, 1);
ResultSetMetaData meta = RS.getMetaData();
while (RS.next()) {
Map<String, Object> row = new HashMap<String, Object>();
for (int iCurr = 1; iCurr <= meta.getColumnCount(); iCurr++) {
String sCol = meta.getColumnName(iCurr);
if (!_inProcessField.equalsIgnoreCase(sCol)) {
final int type = meta.getColumnType(iCurr) ;
if (type == Types.BLOB) {
final Blob blob = RS.getBlob(iCurr) ;
row.put(sCol, ((blob != null) ? StreamUtils.readStreamString(blob.getBinaryStream(), "UTF-8") : null));
} else if (type == Types.CLOB) {
final Clob clob = RS.getClob(iCurr) ;
row.put(sCol, ((clob != null) ? StreamUtils.readReader(clob.getCharacterStream()) : null));
} else {
row.put(sCol, RS.getObject(iCurr));
}
}
}
oResults.add(row);
}
}
catch (Exception e) {
_logger.debug("Some triggers might not have been returned", e);
}
finally {
try {
if (RS != null)
RS.close();
oConn.rollback();
} catch (final SQLException sqle) {
refreshDatasource();
}
}
if (_logger.isDebugEnabled()) {