1 Reply Latest reply on Apr 14, 2016 3:00 AM by Martin Kouba

    Creating a new Thread with CDI

    kalaivani sengottaiyan Newbie

      HI,

       

      We are using JSF2.0, Richfaces and CDI in a tomcat environment. Our requirement is to do a UI processing in a background thread and fetch data.  So we create a thread pool and do the processing ( like fetching the data from database). Now we want to push this content to UI using Push Topic of Richfaces. Since the thread we have created manually does not have all the related objects( esp session relation information), using the push context and related objects fails with "No Context available". Creating the bound context also does not help as it does not contain any of the session relation information as the UI thread. How to we link the thread we have created with CDI so it gets the context?