You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Simon Kitching <si...@chello.at> on 2007/09/10 18:45:45 UTC

[Orchestra] FrameworkAdapter tidyup

Hi,

Currently the class FrameworkAdapterServletFilter caches the HttpServletRequest and HttpServletResponse objects so that they can be accessed by the JsfFrameworkAdapter class. This seems a little clumsy; it would be nicer if the JsfFrameworkAdapter class was itself responsible for caching any data it needed, and if the adapter implementation didn't have to reference the original servlet.

How about introducing this new interface?

public interface ServletFrameworkAdapter
{
public void beginRequest(ServletRequest req, ServletResponse rsp);
public void endRequest();
}

The JsfFrameworkAdapter can then implement this, and the threadlocal stuff can be moved out of the FrameworkAdapterServlet into JsfFrameworkAdapter. The FrameworkAdapterServlet just needs to invoke
the beginRequest/endRequest methods and not care what the adapter does with them.

Thoughts?

Regards,

Simon