Re: [picocontainer-dev] circular refs.
Mauro Talevi <[email protected]> Fri, 04 Jul 2008 16:56:11 +0100
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
peter royal wrote:
> On Jul 4, 2008, at 6:47 AM, Paul Hammant wrote:
>> It's about circular refs. It turns out that we always supported
>> circular refs unwittingly. If you did Implementation hiding, then the
>> circular was possible. Rather than suggest to users that adding
>> ImplemementationHiding must be part of the CAF chain for this, I've
>> added a characteristic that allows it to specified as you're adding
>> the component:
>>
>> @Test
>> public void circularIsPossible() {
>> DefaultPicoContainer pico = new DefaultPicoContainer(new
>> Caching().wrap(new SetterInjection()));
>>
>> pico.as(Characteristics.ENABLE_CIRCULAR).addComponent(IFish.class,
>> Fish.class);
>
> +1 .. the IH workaround is kinda sneaky, its good to be explicit on why
> its being used
+1
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email