Skip to content

Commit

Permalink
minor revs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin King committed Nov 9, 2009
1 parent 772b8b5 commit 6db5d7c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions reference/en-US/injection.xml
Expand Up @@ -5,16 +5,16 @@

<para>
One of the most significant features of CDI, certainly the most recognized, is dependency injection; but not just
dependency injection, <emphasis>type-safe</emphasis> dependency injection. In this chapter, you'll learn how CDI
is able to leverage the Java type system and annotations to build a dependency injection strategy that is both
strongly typed and keeps the implementation hidden from the client.
dependency injection&#8212;<emphasis>type-safe</emphasis> dependency injection. In this chapter, you'll learn how
CDI is able to leverage the Java type system and annotations into a dependency injection strategy that is both
strongly typed and keeps the bean implementation hidden from its clients.
</para>

<section>
<title>Where you can <literal>@Inject</literal></title>

<para>
Injections are declared using the JSR-330 annotation, <literal>@Inject</literal>, along with an optional set of
Injection points are declared using the JSR-330 annotation, <literal>@Inject</literal>, along with an optional set of
qualifiers annotations. CDI supports three primary mechanisms for dependency injection during bean
construction:
</para>
Expand Down Expand Up @@ -600,7 +600,8 @@ PaymentProcessor p = anyPaymentProcessor.select(qualifier).get().process(payment
gives an alternate way for that bean to be referenced&#8212;by a string-based name.
</para>

<programlisting role="JAVA"><![CDATA[public @Named("cart") @SessionScoped class ShoppingCart {
<programlisting role="JAVA"><![CDATA[public @Named("cart") @SessionScoped
class ShoppingCart implements Serializable {
...
}]]></programlisting>
<programlisting role="JAVA"><![CDATA[public @Produces @Named("items") List<Item> getItems() { ... }]]></programlisting>
Expand Down

0 comments on commit 6db5d7c

Please sign in to comment.