} finally { ec.unlock();
    public void runBatchReport() {        // we run over all people in the DB and send them a summary email if they have unread bugs        EOEditingContext ec=new EOEditingContext();        NSArray everybody=EOUtilities.objectsForEntityNamed(ec,"People");        for (Enumeration e=everybody.objectEnumerator(); e.hasMoreElements();) {            EOEnterpriseObject person=(EOEnterpriseObject)e.nextElement();            NSDictionary bindings = new NSDictionary(new Object[] {person}, new Object[] {"user"});            NSArray unreadBugs=EOUtilities.objectsWithFetchSpecificationAndBindings (ec,                                                                                     "Bug",                                                                                     "MyUnreadBugs",                                                                                     bindings);            String email=(String)person.valueForKey("email");           if (unreadBugs.count()>0 && email!=null && email.length()!=0) {                WOComponent emailBody = pageWithName("BugReportEmail",                                                     new WOContext(new WORequest(null,null,null,null,null,null)));                emailBody.takeValueForKey(unreadBugs,"unreadBugs");                emailBody.takeValueForKey(person,"owner");                WOMailDelivery.sharedInstance().composeComponentEmail("bugtracker@netstruxr.com",                                                                      new NSArray(person.valueForKey("email")),                                                                      null,                                                                      "You have "+unreadBugs.count()+" unread bug(s)",                                                                      emailBody,                                                                      true);                NSLog.debug.appendln("Sending report to "+email+": "+unreadBugs.count()+" unread bugs");            }        }    }