if (result != null) {
// if we have any results from the query set up the connection
// to the local task session EJB
InitialContext ctx = new InitialContext();
TaskLocalHome taskHome = (TaskLocalHome)ctx.lookup("local/Task");
TaskLocal taskBean = taskHome.create();
taskBean.setDataSource(dataSource);
// the iterate through the results of the query grabbing a taskVO
// for each id.
Iterator i = result.iterator();
while (i.hasNext()) {
HashMap resultRow = (HashMap)i.next();
Number taskId = (Number)resultRow.get("taskId");
try {
TaskVO task = taskBean.getTask(taskId.intValue(), individualId);
taskList.add(task);
} catch (AuthorizationFailedException afe) {
// no reason to completely fail here, it will just be one less thing
// on our list. dump it in the logs, because it is indicative of an
// underlying problem