[weld-commits] Weld SVN: r4289 - api/trunk/cdi/src/main/java/javax/enterprise/event.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sun Oct 25 01:03:37 EDT 2009


Author: gavin.king at jboss.com
Date: 2009-10-25 01:03:37 -0400 (Sun, 25 Oct 2009)
New Revision: 4289

Modified:
   api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
   api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
Log:
doc observer exception

Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java	2009-10-25 04:44:44 UTC (rev 4288)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/ObserverException.java	2009-10-25 05:03:37 UTC (rev 4289)
@@ -18,10 +18,11 @@
 package javax.enterprise.event;
 
 /**
- * Wraps any checked exceptions which occur during the notification of an
- * observer
+ * <p>Wraps checked exceptions thrown by observer methods,
+ * allowing them to be rethrown by the container.</p>
  * 
  * @author Pete Muir
+ * @author Gavin King
  */
 
 public class ObserverException extends RuntimeException

Modified: api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java	2009-10-25 04:44:44 UTC (rev 4288)
+++ api/trunk/cdi/src/main/java/javax/enterprise/event/package-info.java	2009-10-25 05:03:37 UTC (rev 4289)
@@ -43,6 +43,19 @@
  * so portable applications should not rely upon the order in which 
  * observers are called.</p>
  * 
+ * <p>Observer methods may throw exceptions:</p>
+ * 
+ * <ul>
+ * <li>If the observer method is a 
+ * {@linkplain javax.enterprise.event.TransactionPhase transactional 
+ * observer method}, any exception is caught and logged by the container.</li>
+ * <li>Otherwise, the exception aborts processing of the event.
+ * No other observer methods of that event will be called. The 
+ * exception is rethrown. If the exception is a checked exception, 
+ * it is wrapped and rethrown as an (unchecked) 
+ * {@link javax.enterprise.event.ObserverException}.</li>
+ * </ul>
+ * 
  * @see javax.enterprise.event.Observes
  * @see javax.enterprise.event.Event
  */



More information about the weld-commits mailing list