Author: pete.muir(a)jboss.org
Date: 2009-10-18 09:04:11 -0400 (Sun, 18 Oct 2009)
New Revision: 4181
Modified:
doc/trunk/reference/en-US/ri-spi.xml
Log:
Update requirements for performing EE component injection
Modified: doc/trunk/reference/en-US/ri-spi.xml
===================================================================
--- doc/trunk/reference/en-US/ri-spi.xml 2009-10-18 12:51:53 UTC (rev 4180)
+++ doc/trunk/reference/en-US/ri-spi.xml 2009-10-18 13:04:11 UTC (rev 4181)
@@ -760,11 +760,25 @@
class.
</para>
- <programlisting><![CDATA[
+ <para>
+ The CDI specification also requires that a
+ <literal>ProcessInjectionTarget</literal> event is fired
for
+ every Java EE component class. Furthermore, if an observer
+ calls
<literal>ProcessInjectionTarget.setInjectionTarget()</literal>
+ the container must use <emphasis>the specified</emphasis>
injection
+ target to perform injection.
+ </para>
+
+ <para>
+ To help the integrator, Weld provides
+
<literal>WeldManager.fireProcessInjectionTarget()</literal>
+ which returns the <literal>InjectionTarget</literal> to
use.
+ </para>
+
+ <programlisting><![CDATA[// Fire ProcessInjectionTarget,
returning the InjectionTarget
+// to use
+InjectionTarget it = weldBeanManager.fireProcessInjectionTarget(clazz);
-// Create the injection target, once per class
-InjectionTarget it = beanManager.createInjectionTarget(clazz);
-
// Per instance required, create the creational context
CreationalContext<?> cc = beanManager.createCreationalContext(null);
Show replies by date