Couldn't get "FacesContext.getCurrentInstance()" in self spawned thread.
Required to update the components dynamically based on a back-end process. Achieved the same by creating a thread for monitor the process and call back the component updation along with p:poll.
However, seems "FacesContext.getCurrentInstance()" is not available for the new thread. Just getting NPE while calling any utility methods that relies with FacesContext.getCurrentInstance() from the newly spawned thread.
Is there any way to get the "FacesContext.getCurrentInstance()" available in self spawned thread?
Environment JSF2.0, Prettyfaces-jsf2-3.3.2, Primafaces 3.2, Tomcat 6.0.32, JDK 5.0
thank you,