Re: [picocontainer-dev] ThreadLocal caching - review please
Jörg Schaible <[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Paul,
Paul Hammant wrote:
> Jörg in particular, can people have a look at http://
> svn.picocontainer.codehaus.org/changelog/picocontainer/?cs=3808
>
> Its possibly too simple. I need help to understand that if so.
It's fine, but it will only cover the second case of the implementations at
gems.
> Its designed for web apps. The theory is create and populate three
> containers only. One for App, one for session and one for request.
>
> The Session and Request instance will cache components on ThreadLocal.
> After each request you'd flush the cache (todo) on the request container
> The web container used must be able to round-trip the session
> container and its threadlocal cached comps perfectly.
Two things:
1/ Drop the second ctor. The ThreadLocalReference is why this class exists,
so it does not make any sense to me to offer a ctor, where you can replace
this reference with e.g. a SimpleReference.
2/ Make the ThreadLocalReference an explicit class. Maybe we should have
a .ref or .references package for all the impls.
If you keep this implementation, we should modify the gems version so that
it only supports the proxy case and makes usage of this ThreadLocalRef impl
instead of providing a 2nd impl.
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email