Re: [picocontainer-dev] Patch for web ... to close that static getter IoC problem
Jörg Schaible <[email protected]> Fri, 20 Jun 2008 15:24:42 +0200
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Paul,
Paul Hammant wrote:
>
>
> Well it goes part way.
> By extending a filter, we can use some private magic to hide the
> static thread local vars that would otherwise make things publicly
> available.
>
> It dictates a scenario where there is only one pico-leveraging filter
> per web app. And only one 'ActionFactory' thing that is using that.
> Axis and Webwork1 have two things - so it needs more thought.
>
> Axis - PicoMsgProvider, PicoRpcProvider
> WebWork1 - PicoActionFactory, WebWorkVelocityServlet
>
> Thoughts?
what I am always curious about is, whether there is a real need for the
different containers. Do we really have different component types for the
sessions or requests or is it that we need separate instances? In the
latter case, there's absolutely no need for thread local containers at all.
All you need are different component adapters. Like the ThreadLocalized you
simply need a RequestScoped or SessionScoped one and you will get a new
instance for each scope accordingly. The filter might add Picos to the
different scopes, but why do they have to be thread localized?
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email