public function registerBean(BeanDescriptorInterface $descriptor)
    {

        try {
            // load the application instance
            $application = $this->getApplication();

            // register the bean with the default name/short class name
            $application->getNamingDirectory()
                        ->bind(
                            sprintf('php:global/%s/%s', $application->getUniqueName(), $descriptor->getName()),
                            array(&$this, 'lookup'),
                            array($descriptor->getName())
                        );

            // register's the bean's references
            $this->registerReferences($descriptor);

            // generate the remote proxy and register it in the naming directory
            $this->getRemoteProxyGenerator()->generate($descriptor);

        } catch (\Exception $e) {
            // log the exception
            $this->getApplication()->getInitialContext()->getSystemLogger()->critical($e->__toString());
        }
    }