Details
Description
Found this while testing autoBeansFacelets.
Right now, if you use an IntervalRenderer, and the session expires, then it will
throw however many TransientRenderingExceptions before failing, exactly the same
as if you closed the browser window. But, that's unnecessary, because the class
that calls render on the PersistentFacesState could just look into the
PersistentFacesState, and see if the session has expired, and immediately throw
a fatal rendering exception.
In a server with tight resources it would probably be preferable to use a
fail-fast strategy here, especially if the IntervalRenderer uses a large time
interval, which could unnecessarily hold resources for a very long time.
ERROR [D2DFaceletViewHandler] Problem in renderResponse: getAttribute: Session
already invalidated
java.lang.IllegalStateException: getAttribute: Session already invalidated
at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1011)
at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:109)
at
com.icesoft.faces.webapp.http.servlet.ServletSessionMap.getAttribute(ServletSessionMap.java:19)
at
com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94)
at
com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:314)
at
com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:325)
at
com.icesoft.faces.application.D2DViewHandler.clearSession(D2DViewHandler.java:602)
at
com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:246)
at
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at
com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:124)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:595)
Right now, if you use an IntervalRenderer, and the session expires, then it will
throw however many TransientRenderingExceptions before failing, exactly the same
as if you closed the browser window. But, that's unnecessary, because the class
that calls render on the PersistentFacesState could just look into the
PersistentFacesState, and see if the session has expired, and immediately throw
a fatal rendering exception.
In a server with tight resources it would probably be preferable to use a
fail-fast strategy here, especially if the IntervalRenderer uses a large time
interval, which could unnecessarily hold resources for a very long time.
ERROR [D2DFaceletViewHandler] Problem in renderResponse: getAttribute: Session
already invalidated
java.lang.IllegalStateException: getAttribute: Session already invalidated
at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1011)
at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:109)
at
com.icesoft.faces.webapp.http.servlet.ServletSessionMap.getAttribute(ServletSessionMap.java:19)
at
com.icesoft.faces.context.AbstractAttributeMap.containsKey(AbstractAttributeMap.java:94)
at
com.icesoft.faces.application.D2DViewHandler.getContextServletTables(D2DViewHandler.java:314)
at
com.icesoft.faces.application.D2DViewHandler.getContextServletTable(D2DViewHandler.java:325)
at
com.icesoft.faces.application.D2DViewHandler.clearSession(D2DViewHandler.java:602)
at
com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:246)
at
com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
at
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
at
com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:124)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
at java.lang.Thread.run(Thread.java:595)
Changed Assignee Priority to P1 and assigned to me