RE: [picocontainer-dev] Trying an experiment to kill off ContainerRecorder (Nano)
Konstantin Priblouda <kpriblouda-/[email protected]>
| Newsgroups | gmane.comp.java.picocontainer.devel |
|---|---|
| Message-ID | <[email protected]> |
--- Michael Rimov <[email protected]> wrote: > > Instance components for session level is not > something I thought of > > with the ThreadLocal/Storing thing. > > > > If application level, then regular caching is the > strategy > > > > Request level, in-theory, a no-caching and > no-storing CA would still > > cache instance registrations. > > Right, and it was forcing me to completely rebuild > the container with each > servlet request. (I don't use Session level > Container) > > > > > Where do you use instance registrations dude ? > > //Example... > public class Action { > > public Action(HttpServletRequest request, > HttpServletResponse response) > { > //..... > } > } > > pico.addComponent(Action.class); > pico.addComponent(HttpServletRequest.class, > request); > pico.addComponent(HttpServletResponse.class, > response); > pico.addComponent(HttpSession.class, > request.getSession(true)); > Action action = pico.getComponent(Action.class); Action depending on servlet stuff is pretty uncool by itself. What framework are you using? I know that WW2/XW2 could be slight overkill, but at least you will get request parsing and parameter passing for free. regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- JTec quality components: http://www.pribluda.de/projects/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email