protected function loopOverEventsForOwner($owner, $queue)
 {
     $types = $this->system_event_manager->getTypesForQueue($queue);
     if (!$types) {
         return array();
     }
     $executed_events_ids = array();
     while (($dar = $this->dao->checkOutNextEvent($owner, $types)) != null) {
         $sysevent = $this->getSystemEventFromDar($dar);
         if ($sysevent) {
             $this->executeSystemEvent($sysevent);
             $executed_events_ids[] = $sysevent->getId();
         }
     }
     return $executed_events_ids;
 }