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

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
Mike,

>>
>> 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);
>

Could you use this http://fisheye.codehaus.org/changelog/picocontainer/java/2.x/trunk/nanoextras?cs=4406 
  instead ?

And the following once-once composition fragment?

   sessionContainer.addAdapter(new  
ServletRequestContainerFilter.SessionInjector())

   requestContainer.addAdapter(new  
ServletRequestContainerFilter.RequestInjector())
   requestContainer.addAdapter(new  
ServletRequestContainerFilter.ResponseInjector())

- Paul

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