6 Replies Latest reply on Nov 6, 2011 1:52 PM by Lukáš Fryč

    RichFaces 4 - fileUpload; CDI- Conversation scope

    kem Newbie



      fileUpload only works with SessionScope!


      in a conversation scope I got the following:


      1. During the upload file, a conversation start.
      2. the file is uploaded
      3. when I click on submit, the submit() method is called
      4. a new conversation starts
      5. the uploaded file is null.


      In a SessionScope, everything works fine.


      Does the fileUpload only works in a SessionScope?







      public class UploadBean implements Serializable{


         private Logger log = LoggerFactory.getLogger(AnnotateBean.class);


         private UploadedFile uploadedFile;



         Conversation conversation;


         public UploadBean() {





         private void init() {

            if (conversation.isTransient()) {


               log.debug("conversation started cid=" + conversation.getId());





         public void listner(FileUploadEvent event) throws IOException {

            this.uploadedFile = event.getUploadedFile();




         public void submit() {

            log.debug("submit called for " + uploadedFile.getName());