/**
  * Deploys the entity manager described by the passed XML node.
  *
  * @param \AppserverIo\Psr\Application\ApplicationInterface            $application         The application instance
  * @param \AppserverIo\Appserver\Core\Api\PersistenceUnitNodeInterface $persistenceUnitNode The XML node that describes the entity manager
  *
  * @return void
  */
 public function registerEntityManager(ApplicationInterface $application, PersistenceUnitNodeInterface $persistenceUnitNode)
 {
     // initialize the the entity manager instance
     $this->entityManagers[$lookupName = $persistenceUnitNode->getName()] = $persistenceUnitNode;
     // bind the callback for the entity manager instance to the
     // naming directory => necessary for DI provider
     $application->getNamingDirectory()->bind(sprintf('php:global/%s/%s', $application->getUniqueName(), $lookupName), array(&$this, 'lookup'), array($lookupName));
 }