Skip to content

Commit

Permalink
move
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin King committed Nov 16, 2009
1 parent 4c1cdd0 commit 7092ff3
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions reference/en-US/producermethods.xml
Expand Up @@ -93,16 +93,6 @@ public class Preferences implements Serializable {
object for each user session.
</para>

<note>
<para>
The producer method does <emphasis>not</emphasis> inherit the scope of the bean that declares the
method. There are two different beans here: the producer method, and the bean which declares it. The
scope of the producer method determines how often the method will be called, and the lifecycle of the
objects returned by the method. The scope of the bean that declares the producer method determines the
lifecycle of the object upon which the producer method is invoked.
</para>
</note>

<para>
To change this behavior, we can add a <literal>@SessionScoped</literal> annotation to the method.
</para>
Expand All @@ -117,6 +107,16 @@ public PaymentStrategy getPaymentStrategy() {
the session context. The producer method won't be called again in the same session.
</para>

<note>
<para>
A producer method does <emphasis>not</emphasis> inherit the scope of the bean that declares the
method. There are two different beans here: the producer method, and the bean which declares it. The
scope of the producer method determines how often the method will be called, and the lifecycle of the
objects returned by the method. The scope of the bean that declares the producer method determines the
lifecycle of the object upon which the producer method is invoked.
</para>
</note>

</section>

<section>
Expand Down

0 comments on commit 7092ff3

Please sign in to comment.