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()) {