axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r518826 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
Date Fri, 16 Mar 2007 01:40:38 GMT
Author: dims
Date: Thu Mar 15 18:40:37 2007
New Revision: 518826

URL: http://svn.apache.org/viewvc?view=rev&rev=518826
Log:
Fix for AXIS2-2321 - Mail transport - error handling in SimpleMailListener

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java?view=diff&rev=518826&r1=518825&r2=518826
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
Thu Mar 15 18:40:37 2007
@@ -229,11 +229,17 @@
 
                     for (int i = 0; i < msgs.length; i++) {
                         MimeMessage msg = (MimeMessage) msgs[i];
-                        MessageContext mc = createMessageContextToMailWorker(msg);
-                        if (mc != null) {
-                            messageQueue.add(mc);
+                        try {
+                            MessageContext mc = createMessageContextToMailWorker(msg);
+                            if (mc != null) {
+                                messageQueue.add(mc);
+                            }
+                        } catch (Exception e) {
+                            log.error("Error in SimpleMailListener - processing mail " +
e );
+                        } finally {
+                            // delete mail in any case
+                            msg.setFlag(Flags.Flag.DELETED, true);
                         }
-                        msg.setFlag(Flags.Flag.DELETED, true);
                     }
                 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message