ResultSet resultSet = selectStmt.executeQuery();
ArrayList<MessageInfo> logs = new ArrayList<MessageInfo>();
while (resultSet.next()) {
MessageInfo messageInfo = new MessageInfo();
messageInfo.setCorrelationId(resultSet.getString(1));
String response = resultSet.getString(2);
if (response == null) response = resultSet.getString(3);
if (response != null) {
try {
Response<?> responseObject = (Response<?>)serializer.deserializeResponse(response);
messageInfo.setMessage(responseObject.toString());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
messageInfo.setTimestamp(resultSet.getTimestamp(4)!=null?new Date(resultSet.getTimestamp(4).getTime()):null);
messageInfo.setTimeout(resultSet.getTimestamp(5)!=null?new Date(resultSet.getTimestamp(5).getTime()):null);
logs.add(messageInfo);
}
resultSet.close();
return logs;
} catch (SQLException e) {