public function registerBeans(ApplicationInterface $application)
    {

        // parse the object descriptors
        $this->parseObjectDescriptors();

        // load the object manager
        /** @var \AppserverIo\Psr\Di\ObjectManagerInterface $objectManager */
        $objectManager = $this->getApplication()->search(ObjectManagerInterface::IDENTIFIER);

        // register the beans found by annotations and the XML configuration
        /** \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor */
        foreach ($objectManager->getObjectDescriptors() as $descriptor) {
            // check if we've found a bean descriptor and register the bean
            if ($descriptor instanceof BeanDescriptorInterface) {
                $this->registerBean($descriptor);
            }
        }
    }