• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF:.getApplication() from FacesContext inside a new thread

Daniel Reznick
Ranch Hand
Posts: 50
Eclipse IDE Google App Engine jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following scenario: after a user submit's a form im calling the actionListener in wich im storing the FacesContext.getCurrentInstance() into a static variable
in the following way : EITUtils.aFacesContext=FacesContext.getCurrentInstance(); than i starting a thread wich will execute a long operation

here the entire code

in the begining of the thread run method im retriving the request with the following way:

and later on im using the retrivied request several times with full success...

eventually in the end of the run method i want to display some webpage with information , and im doing it in the following way:

but im getting the an error

Exception in thread "Wooow" java.lang.IllegalStateException
at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:428)
at com.sun.faces.context.FacesContextImpl.getApplication(FacesContextImpl.java:159)
at eit.adminnook.java.mytest.run(mytest.java:58)

p.s i cant use ajax in this project...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic