[weld-commits] Weld SVN: r4331 - in api/trunk/cdi/src/main/java/javax: enterprise/inject and 1 other directory.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Mon Oct 26 13:06:29 EDT 2009


Author: gavin.king at jboss.com
Date: 2009-10-26 13:06:29 -0400 (Mon, 26 Oct 2009)
New Revision: 4331

Modified:
   api/trunk/cdi/src/main/java/javax/decorator/package-info.java
   api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
Log:
improve interceptors/decorators

Modified: api/trunk/cdi/src/main/java/javax/decorator/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/decorator/package-info.java	2009-10-26 16:34:48 UTC (rev 4330)
+++ api/trunk/cdi/src/main/java/javax/decorator/package-info.java	2009-10-26 17:06:29 UTC (rev 4331)
@@ -38,10 +38,7 @@
  * 
  * <p>All decorators have a 
  * {@linkplain javax.decorator.Decorates delegate injection point}.  
- * The decorator applies to any bean that is eligible for injection 
- * to the delegate injection point.</p>
- * 
- * <p>A delegate injection point is an injection point of the bean 
+ * A delegate injection point is an injection point of the bean 
  * class annotated {@link javax.decorator.Decorates &#064;Decorates}.</p>
  * 
  * <p>The type of the delegate injection point must implement or 
@@ -58,6 +55,15 @@
  * ordering. Decorators which occur earlier in the list are called 
  * first.</p>
  * 
+ * <p>A decorator is bound to a bean if:</p>
+ * 
+ * <ul>
+ * <li>The bean is {@linkplain javax.enterprise.inject eligible for injection} 
+ * to the delegate injection point of the decorator.</li>
+ * <li>The decorator is enabled in the bean deployment archive of 
+ * the bean.</li>
+ * </ul>
+ * 
  * @see javax.decorator.Decorator
  * @see javax.decorator.Decorates
  * 

Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java	2009-10-26 16:34:48 UTC (rev 4330)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/package-info.java	2009-10-26 17:06:29 UTC (rev 4331)
@@ -141,10 +141,19 @@
  * 
  * <h3>Interceptor bindings</h3>
  * 
- * <p>Interceptor bindings may be used to associate interceptors with any 
- * managed bean that is not itself an interceptor or decorator or with any 
- * EJB session or message-driven bean.</p>
+ * <p>{@linkplain javax.interceptor Interceptors} may be bound to any managed 
+ * bean that is not itself an interceptor or decorator or to any EJB session 
+ * or message-driven bean. An interceptor that is annotated 
+ * {@link javax.interceptor.Interceptor &#064;Interceptor} may be identified 
+ * by its interceptor bindings.</p>
  * 
+ * <pre>
+ * &#064;Transactional &#064;Interceptor
+ * public class TransactionInterceptor {
+ *    &#064;AroundInvoke public Object manageTransaction(InvocationContext ctx) { ... }
+ * }
+ * </pre>
+ * 
  * <p>An interceptor binding type is a Java annotation annotated 
  * {@link javax.interceptor.InterceptorBinding &#064;InterceptorBinding}.
  * An interceptor binding of a bean may be declared by annotating the bean 
@@ -363,11 +372,29 @@
  * <p>If an EL name resolves to more than one bean, the container attempts to resolve 
  * the ambiguity by eliminating all beans which are not alternatives.</p>
  * 
+ * <h3>Enabled interceptors</h3>
+ * 
+ * <p>By default, a bean deployment archive has no enabled interceptors. An 
+ * interceptor must be explicitly enabled by listing its bean class under the 
+ * <tt>&lt;interceptors&gt;</tt> element of the <tt>beans.xml</tt> file of the 
+ * bean deployment archive. The order of the interceptor declarations determines 
+ * the interceptor ordering. Interceptors which occur earlier in the list are 
+ * called first.</p>
+ * 
+ * <p>An interceptor is bound to a bean if:</p>
+ * 
+ * <ul>
+ * <li>The bean has all the interceptor bindings of the interceptor.</li>
+ * <li>The interceptor is enabled in the bean deployment archive of 
+ * the bean.</li>
+ * </ul>
+ * 
  * @see javax.enterprise.context
+ * @see javax.inject
+ * @see javax.interceptor
+ * @see javax.decorator
+ * 
  * @see javax.enterprise.inject.Produces
- * @see javax.inject.Named
- * @see javax.inject.Qualifier
- * @see javax.interceptor.InterceptorBinding
  * @see javax.enterprise.inject.Alternative
  * 
  */



More information about the weld-commits mailing list