Bean<?> bean = beanManager.resolve(beanManager.getBeans(Dialogue.class));
return (Dialogue) beanManager.getReference(bean, Dialogue.class, beanManager.createCreationalContext(bean));
}
public static DialogueManager dialogueManager(ServletContext servletContext) {
BeanManager beanManager = new BeanManagerLocator().getBeanManager();
Bean<?> bean = beanManager.resolve(beanManager.getBeans(DialogueManager.class));
return (DialogueManager) beanManager.getReference(bean, DialogueManager.class, beanManager.createCreationalContext(bean));
}