CDI VooDoo – The Bean Manager and Circular Injection

CDI supports circular dependency injection when at least one of the beans has a [simple_tooltip content=’standard CDI: @ApplicationScoped, @SessionScoped, @ConversationScoped, @RequestScoped’]normal scope*[/simple_tooltip], this may be useful when sharing contextual information between beans of same or different scope (e.g. MVC pattern).

The CDI BeanManager is responsible for the creation of all CDI beans and managing contextual access to all normal scoped beans.

[java]
@RequestScoped
public class Foo {
@Inject
private Bar bar;

}

@RequestScoped
public class Bar {
@Inject
private Foo foo;

}
[/java]

Continue reading CDI VooDoo – The Bean Manager and Circular Injection