openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1607467 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event: NotificationManager.java ObserverMethodImpl.java
Date Wed, 02 Jul 2014 20:04:08 GMT
Author: struberg
Date: Wed Jul  2 20:04:08 2014
New Revision: 1607467

URL: http://svn.apache.org/r1607467
Log:
Exceptions in CDI Extensions must cause a DeploymentException

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java?rev=1607467&r1=1607466&r2=1607467&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/NotificationManager.java
Wed Jul  2 20:04:08 2014
@@ -46,6 +46,7 @@ import javax.enterprise.util.TypeLiteral
 import org.apache.webbeans.component.AbstractOwbBean;
 import org.apache.webbeans.config.OWBLogConst;
 import org.apache.webbeans.config.WebBeansContext;
+import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.logger.WebBeansLoggerFacade;
 import org.apache.webbeans.portable.events.generics.GenericBeanEvent;
@@ -466,6 +467,11 @@ public final class NotificationManager
                     InvocationTargetException invt = (InvocationTargetException)exc;
                     exc = invt.getCause();
                 }
+
+                if (isLifecycleEvent)
+                {
+                    throw new WebBeansConfigurationException("Error while sending SystemEvent
to a CDI Extension! " + event.toString(), e);
+                }
                 
                 if (!RuntimeException.class.isAssignableFrom(exc.getClass()))
                 {

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java?rev=1607467&r1=1607466&r2=1607467&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/event/ObserverMethodImpl.java
Wed Jul  2 20:04:08 2014
@@ -298,7 +298,7 @@ public class ObserverMethodImpl<T> imple
         }
         catch (Exception e)
         {
-                throw new WebBeansException(e);
+            throw new WebBeansException(e);
         }
         finally
         {



Mime
View raw message