[weld-dev] Circular dependencies between dependent bean constructors

Pete Muir pmuir at redhat.com
Fri Apr 9 04:29:45 EDT 2010


Further, Stuart and I are wondering if "(Beans with scope @Dependent never have circular dependencies.)" from 5.4 means that dependent beans are not allowed to have circular dependencies (definition error) or whether it means that they just don't have circular deps (and that the container must break the circularity.

On 9 Apr 2010, at 09:06, Pete Muir wrote:

> class Foo {
> 
>   @Inject
>   Foo (Bar bar) {}
> }
> 
> class Bar {
> 
>   @Inject
>   Bar (Foo foo) {}
> 
> }
> 
> The spec implies that this circularity is breakable without a proxy, but I never saw a good way to do it.
> 
> Any ideas?
> 
> This relates to https://jira.jboss.org/jira/browse/WELD-479 which I don't believe is the intent of the spec.
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev




More information about the weld-dev mailing list