[jsr-314-open] Faces continues processes lifecycle even when facesContext.responseComplete() has been called

Lincoln Baxter, III lincolnbaxter at gmail.com
Sun Sep 6 12:00:25 EDT 2009


If the current response has already been completed before RESTORE_VIEW
phase (eg, because a PhaseListener called
facesContext.responseComplete()  beforePhase ), Faces continues to
attempt lifecycle processing. I'm thinking that this should be handled
by halting lifecycle processing as defined in the API -- Is this a bug
or a something we need to discuss? What do you guys think?


    /**
     * <p>Signal the JavaServer Faces implementation that the HTTP
response
     * for this request has already been generated (such as an HTTP
redirect),
     * and that the request processing lifecycle should be terminated as
soon
     * as the current phase is completed.</p>
     *
     * @throws IllegalStateException if this method is called after
     *  this instance has been released
     */
    public abstract void responseComplete();


Caused by: java.lang.IllegalStateException
	at
com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:639)
	at
com.sun.faces.context.FacesContextImpl.getCurrentPhaseId(FacesContextImpl.java:515)
	at
javax.faces.event.ExceptionQueuedEventContext.<init>(ExceptionQueuedEventContext.java:148)
	at
javax.faces.event.ExceptionQueuedEventContext.<init>(ExceptionQueuedEventContext.java:101)
	at com.sun.faces.lifecycle.Phase.queueException(Phase.java:152)
	at com.sun.faces.lifecycle.Phase.queueException(Phase.java:145)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:105)
	at
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:110)
	at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:310)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
--
Lincoln Baxter, III
Co-Founder of OcpSoft
Author of PrettyFaces URL Rewriting for JSF


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jsr-314-open-mirror/attachments/20090906/d058a099/attachment.html 


More information about the jsr-314-open-mirror mailing list