* @see org.apache.myfaces.trinidad.config.Configurator#endRequest(javax.faces.context.ExternalContext)
*/
@Override
public void endRequest(ExternalContext ec)
{
RequestStateMap state = RequestStateMap.getInstance(ec);
// do per virtual-request stuff
if (state.get(_REQUEST_TYPE) != null)
{
if (!_isDisabled(ec))
{
try
{
//Only end services at the end of a writable response. This will
//generally be RENDER, RESOURCE, and SERVLET.
if (ExternalContextUtils.isResponseWritable(ec))
{
_endConfiguratorServiceRequest(ec);
}
}
finally
{
state.saveState(ec);
_releaseRequestContext(ec);
}
}
state.remove(_REQUEST_TYPE);
}
}