Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6703

camel-mail - Folder is not open

    XMLWordPrintableJSON

Details

    • Patch Available
    • Unknown

    Description

      I think I've found a bug in camel-mail source (MailConsumer.java)
      If you define a mail endpoint which has closeFolder option to true you may encounter a folder is not open exception.
      In fact, the delete action occured during processBatch which is set as an exchange's onCompletion. OnCompletion is executed in a new thread and right after that, we have the finally of the try-catch clause which is executed in a concurrent thread.
      Therefore, we can then have a folder that is open at the beginning of the processCommit but becoming closed during the search for an email with the uid because the finally is executed.

      Am I wrong or is it a real bug?

      I've attached MailConsumer.java that should fix this bug.

      Cheers!

      Attachments

        1. MailConsumer.java
          20 kB
          bounkong khamphousone

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              tiboun bounkong khamphousone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: