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

Reply via email to