K
kitty
i,
I have to build an Email Queue, I am using Commons email and I need to
check the server before sending mails and if the server is down, store
the emails in a queue, I am converting my email to MimeMessage objects
to send to the JMS queue but it says MimeMessages are not serializable,
so I tried to use the writeTo method of MimeMessage, but that also
gives a NonSerializable exception:
My code:
Email email = new Email(); // Commons Email
email.buildMimeMessage();
MimeMessage msg = email.getMimeMessage();
System.out.println("email "+email);
FileOutputStream outStream = new
FileOutputStream("myfile.txt");
msg.writeTo(outStream);
FileInputStream inStream = new
FileInputStream("myfile.txt");
QueMessagingImpl.sendObjectMessage(inStream);
I get this error Message:
Uncategorized exception occured during JMS
processing; nested exception is weblogic.jms.common.JMSException: Error
serializing object; nested exception is
java.io.NotSerializableException: java.io.FileInputStream
All help is appreciated. Thanks in advance,
kitty
I have to build an Email Queue, I am using Commons email and I need to
check the server before sending mails and if the server is down, store
the emails in a queue, I am converting my email to MimeMessage objects
to send to the JMS queue but it says MimeMessages are not serializable,
so I tried to use the writeTo method of MimeMessage, but that also
gives a NonSerializable exception:
My code:
Email email = new Email(); // Commons Email
email.buildMimeMessage();
MimeMessage msg = email.getMimeMessage();
System.out.println("email "+email);
FileOutputStream outStream = new
FileOutputStream("myfile.txt");
msg.writeTo(outStream);
FileInputStream inStream = new
FileInputStream("myfile.txt");
QueMessagingImpl.sendObjectMessage(inStream);
I get this error Message:
Uncategorized exception occured during JMS
processing; nested exception is weblogic.jms.common.JMSException: Error
serializing object; nested exception is
java.io.NotSerializableException: java.io.FileInputStream
All help is appreciated. Thanks in advance,
kitty