/**
  * Dispatches a request to a controller and initializes the security framework.
  *
  * @param \F3\FLOW3\MVC\RequestInterface $request The request to dispatch
  * @param \F3\FLOW3\MVC\ResponseInterface $response The response, to be modified by the controller
  * @return void
  * @author Robert Lemke <*****@*****.**>
  * @author Bastian Waidelich <*****@*****.**>
  */
 public function dispatch(\F3\FLOW3\MVC\RequestInterface $request, \F3\FLOW3\MVC\ResponseInterface $response)
 {
     $dispatchLoopCount = 0;
     while (!$request->isDispatched()) {
         if ($dispatchLoopCount++ > 99) {
             throw new \F3\FLOW3\MVC\Exception\InfiniteLoopException('Could not ultimately dispatch the request after ' . $dispatchLoopCount . ' iterations.', 1217839467);
         }
         $controller = $this->resolveController($request);
         try {
             $controller->processRequest($request, $response);
         } catch (\F3\FLOW3\MVC\Exception\StopActionException $ignoredException) {
         }
     }
 }