Serializing MimeMessage
Hi all,
I have a requirement wherein I need to enqueue a MimeMessage into a JMS queue. Now MimeMessage is not serializable! And I wonder why!
Now here is the problem. I want to invoke the message.getContent() method only after I dequeue from the queue. Which means I will need the entire MimeMessage to be enqueued along with the Session and Folder information. Does the .writeTo(OutputStream) method write this information also into the stream? If no, then what is the alternative?
Again how do I serialize the MimeMessage without losing any info - Folder and Session?
Thanks,
Prabhu
PS - For serialization experts who stumble upon this - The getContent() method actually goes back to the mail server, so we need to retain Session information in this case.

