Re: [picocontainer-dev] circular refs.
peter royal <[email protected]> Fri, 4 Jul 2008 08:24:37 -0700
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
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
-pete
--
(peter.royal|osi)@pobox.com - http://fotap.org/~osi
smime.p7s
(application/pkcs7-signature, 2.4 KB) - not displayed