[weld-dev] Circular dependencies between dependent bean constructors

Gavin King gavin.king at gmail.com
Sun Apr 11 01:08:42 EDT 2010


On Sat, Apr 10, 2010 at 11:18 PM, Marius Bogoevici
<marius.bogoevici at gmail.com> wrote:
>
> On 2010-04-11, at 12:07 AM, Gavin King wrote:
>
>> It's the nature of @Dependent scope that two injection points never
>> refer to the same instance, and that circularities are therefore an
>> impossibility.
>
> Gavin, could you clarify that? From reading your comment, it seems like this use case
> implies unbound recursion: Foo injects Bar which in turns injects another instance of Foo
> (which is dependent on the first instance of Bar) which injects another instance of Bar etc.

Well, exactly. I mean, that's obvious from the definition of an
@Dependent object, right?

I mean, I don't quite follow what the source of doubt here is. Section
6.4 is *very* explicit on this.



-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org


More information about the weld-dev mailing list