protected function _initDbResource()
    {
        $registry = $this->getPluginResource('db');
        if (!$registry) {
            return;
        }

        //
        // options in configs/application
        $options = $registry->getOptions();

        if (array_key_exists('dsn', $options) && '' !== $options['dsn']) {
            $options['params'] = array_replace(
                $options['params'],
                $this->_parseDsn($options['dsn'])
            );
        }

        $registry->setOptions($options);
    }