RE: [picocontainer-dev] Trying an experiment to kill off ContainerRecorder (Nano)

"Michael Rimov" <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Organization Centerline Computers, Inc
Message-ID <022501c8bbe2$30cdb610$92692230$@com>
> 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);

								-Mike



---------------------------------------------------------------------
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.