continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r209343 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
Date Tue, 05 Jul 2005 22:54:06 GMT
Author: jvanzyl
Date: Tue Jul  5 15:54:03 2005
New Revision: 209343

URL: http://svn.apache.org/viewcvs?rev=209343&view=rev
Log:
o if there is a failure in one of the notifiers keep on trucking and use the
  next notifier.
  

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?rev=209343&r1=209342&r2=209343&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
Tue Jul  5 15:54:03 2005
@@ -42,13 +42,19 @@
     extends AbstractLogEnabled
     implements ContinuumNotificationDispatcher
 {
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private NotifierManager notifierManager;
 
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private ContinuumStore store;
 
-    /** @plexus.requirement */
+    /**
+     * @plexus.requirement
+     */
     private RecipientSource recipientSource;
 
     // ----------------------------------------------------------------------
@@ -131,26 +137,26 @@
             return;
         }
 
-        try
+        for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )
         {
-            for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )
-            {
-                ContinuumNotifier continuumNotifier = (ContinuumNotifier) i.next();
+            ContinuumNotifier continuumNotifier = (ContinuumNotifier) i.next();
 
-                String notifierType = continuumNotifier.getType();
+            String notifierType = continuumNotifier.getType();
 
-                Map configuration = continuumNotifier.getConfiguration();
+            Map configuration = continuumNotifier.getConfiguration();
 
+            try
+            {
                 Notifier notifier = notifierManager.getNotifier( notifierType );
 
                 Set recipients = recipientSource.getRecipients( notifierType, messageId,
configuration, context );
 
                 notifier.sendNotification( messageId, recipients, continuumNotifier.getConfiguration(),
context );
             }
-        }
-        catch ( NotificationException e )
-        {
-            getLogger().error( "Error while notifying.", e );
+            catch ( NotificationException e )
+            {
+                getLogger().error( "Error while trying to use the " + notifierType + "notifier.",
e );
+            }
         }
     }
 }



Mime
View raw message