/** * Gets the {@link BeanManager} for a given bean deployment archive id. * * @throws IllegalStateException if the container is not running * @throws IllegalArgumentException if the bean deployment archive id is not found */ public BeanManagerImpl getBeanManager(String beanArchiveId) { if (!started) { throw WeldLogger.ROOT_LOGGER.notStarted("WeldContainer"); } BeanDeploymentArchive beanDeploymentArchive = beanDeploymentArchives.get(beanArchiveId); if (beanDeploymentArchive == null) { throw WeldLogger.ROOT_LOGGER.beanDeploymentNotFound(beanArchiveId); } return bootstrap.getManager(beanDeploymentArchive); }