Re: [picocontainer-dev] Pico2: ASM ImplementationHiding ComponentAdapter

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
HSCA is caching implicitly. So I've no need to wrap with CachingCAF.

Maybe CA should optionally extend a new Caching interface.  That may  
be marker-esque (bad) unless we add a flush() method.

Though if it is as you say I can do:

   CA ca = pico.getComponentAdapter(MyClass.class).getDelegate();
   Object ldInstance = ca.swapRealInstance(newInstance)

Well, it would involve some casts to get it to compile :-)

- Paul

>
> Well, didn't you forget something?
>
> pico.putComponent(new CachingCA(new HSCA(MyClass.class)));
> CA ca = pico.getComponentAdapter(MyClass.class);
>
> How do I swap now?
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.