According to this statement in the JavaDoc for the release() method:
"The implementation must call
setCurrentInstance(javax.faces.context.FacesContext) passing null to remove
the association between this thread and this dead FacesContext instance."
If the call FacesContext.getCurrentInstance() returns null, then the
FacesContext for the current thread has been released.
With that said, I do believe that it would be reasonable to have a
getReleased() method to compliment release() as is true of the
getResponseComplete() and getRenderResponse() methods for responseComplete()
and renderResponse().
-Dan
On Tue, Aug 11, 2009 at 8:56 AM, Lincoln Baxter, III <
lincolnbaxter(a)gmail.com> wrote:
I notice that a lot of places in the JSF code call
assertNotReleased(facesContext), but is there any way to tell if a context
has been released?
The only method i see is "release()"
It would be useful to be able to determine the state of this field.
Feelings?
--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan