protected function initHandlerMappings()
    {
        $this->logger->debug('Initializing HandlerMappings.');
        $this->handlerMappings = array();
        if ($this->detectAllHandlerMappings) {
            $this->logger->debug('Scanning beans for HandlerMappings.');
            $beans = BeanUtils::beansOfType($this->applicationContext, "Ocelot\\Mvc\\Web\\Servlet\\HandlerMapping");
            if (!empty($beans)) {
                $this->handlerMappings = array_values($beans);
            }
        } else {
            $this->logger->debug('Looking up HandlerMapping bean by name.');
            $handlerMapping = $this->initialContext->lookup(self::HANDLER_MAPPING_BEAN_NAME);
            if ($handlerMapping != null && $handlerMapping instanceof HandlerMapping) {
                $this->handlerMappings = array($handlerMapping);
            }
        }
        if (empty($this->handlerMappings)) {
            $this->logger->warning('Could not find any bean of type HandlerMapping, falling back to default strategy.');
            $this->viewResolvers = $this->getDefaultStrategies("Ocelot\\Mvc\\Web\\Servlet\\HandlerMapping");
        }
    }