Skip to content

Commit

Permalink
Update requirements for performing EE component injection
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Oct 18, 2009
1 parent 32aa1e8 commit 8d5a42c
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions reference/en-US/ri-spi.xml
Expand Up @@ -760,10 +760,24 @@
class.
</para>

<programlisting><![CDATA[
// Create the injection target, once per class
InjectionTarget it = beanManager.createInjectionTarget(clazz);
<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);
// Per instance required, create the creational context
CreationalContext<?> cc = beanManager.createCreationalContext(null);
Expand Down

0 comments on commit 8d5a42c

Please sign in to comment.