Re: [picocontainer-dev] Builder confusion and cycles in annotation

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Any chance of a patch Erik ?

- Paul

On Jun 14, 2007, at 11:57 AM, Putrycz, Erik wrote:

> 2 points:
>
> - The builder and default container are confusing: if you use the  
> builder, you get the caching by default even when you don’t say  
> withCaching() because most contructors of picocontainer create the  
> caching adapter. Also having a NOCACHE characteristic + settings in  
> the builder is somehow redundant. I find the  
> componentcharacteristic system not elegant at all.
>
> - The current strategy of dealing with cycles is to throw an  
> exception when a cycle is found. However many cycles can be solved  
> when using only method and field injection. What I suggest (and  
> have done) is to track all the instances being injected and keep  
> going recursively until they are all done even when there are  
> cycles. A current limitation is that all relies on getComponent, so  
> I’m not sure there is a way to flush a cache in a CA after the root  
> getComponent is processed.
>
>
> Erik.
>
>
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.