protected function processConfigurationNode(NodeInterface $node)
{
// load the object manager instance
/** @var \AppserverIo\Appserver\DependencyInjectionContainer\Interfaces\ObjectManagerInterface $objectManager */
$objectManager = $this->getApplication()->search('ObjectManagerInterface');
// iterate over all configured descriptors and try to load object description
/** \AppserverIo\Appserver\Core\Api\Node\DescriptorNode $descriptor */
foreach ($objectManager->getConfiguredDescriptors() as $descriptor) {
try {
// load the descriptor class
$descriptorClass = $descriptor->getNodeValue()->getValue();
// load the object descriptor, initialize the servlet mappings and add it to the object manager
/** \AppserverIo\Psr\Deployment\DescriptorInterface $objectDescriptor */
if ($objectDescriptor = $descriptorClass::newDescriptorInstance()->fromConfiguration($node)) {
$objectManager->addObjectDescriptor($objectDescriptor, true);
}
// proceed with the next descriptor
continue;
// if class can not be reflected continue with next class
} catch (\Exception $e) {
// log an error message
$this->getApplication()->getInitialContext()->getSystemLogger()->error($e->__toString());
// proceed with the next descriptor
continue;
}
}
}