Ok yeah, thats what I thought.<br><br>@Produces @New -- would that not work?<br><br><div class="gmail_quote">On Tue, Apr 20, 2010 at 12:06 PM, Marius Bogoevici <span dir="ltr">&lt;<a href="mailto:marius.bogoevici@gmail.com">marius.bogoevici@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


  

<div text="#000000" bgcolor="#ffffff"><div class="im">
On 10-04-20 11:31 AM, Lincoln Baxter, III wrote:
<blockquote type="cite">Wait -- there&#39;s no &quot;Prototype&quot; or &quot;always new&quot; scope?<br>
</blockquote></div>
@Dependent or @New, from case to case.<div><div></div><div class="h5"><br>
<blockquote type="cite"><br>
--Lincoln<br>
  <br>
  <div class="gmail_quote">On Tue, Apr 20, 2010 at 6:45 AM, Stuart
Douglas <span dir="ltr">&lt;<a href="mailto:stuart@baileyroberts.com.au" target="_blank">stuart@baileyroberts.com.au</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
don&#39;t think I will be able to implement the injection of InjectionPoint
into the producer method, but other than that it should be possible to
implement.<br>
    <font color="#888888"><br>
Stuart<br>
    </font>
    <div>
    <div><br>
    <br>
On 20/04/2010, at 8:15 PM, Pete Muir wrote:<br>
    <br>
&gt; Yes, I agree. I had raised this issue during spec development -
that there was no truly stateless scope in CDI, where the bean instance
was created every time.<br>
&gt;<br>
&gt; I would like to hear from the 299 EG about this as well.<br>
&gt;<br>
&gt; On 20 Apr 2010, at 04:57, Stuart Douglas wrote:<br>
&gt;<br>
&gt;&gt; I think that there is a real use case for something similar to
the @Unwrap feature of seam 2.<br>
&gt;&gt;<br>
&gt;&gt; I think that it would be possible to implement something like
this:<br>
&gt;&gt;<br>
&gt;&gt; @ConversationScoped<br>
&gt;&gt; public class ManagedPersistenceContext<br>
&gt;&gt; {<br>
&gt;&gt;<br>
&gt;&gt; EntityManager entityManager;<br>
&gt;&gt;<br>
&gt;&gt; @Unwrap<br>
&gt;&gt; @SomeQualifier<br>
&gt;&gt; public EntityManager produce(InjectionPoint injectionPoint)<br>
&gt;&gt; {<br>
&gt;&gt; � entityManager.joinTransaction();<br>
&gt;&gt; � return entityManager;<br>
&gt;&gt; }<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; public class MyClass<br>
&gt;&gt; {<br>
&gt;&gt; @Inject @SomeQualifier EntityManager entityManager;<br>
&gt;&gt; }<br>
&gt;&gt;<br>
&gt;&gt; the way I envisage this working is that a proxy gets injected
into MyClass, and this proxy calls ManagedPersistenceContext.produce to
resolve the correct EntityManager to pass the call to every time a
method is invoked on the proxy.<br>
&gt;&gt;<br>
&gt;&gt; I am pretty sure I can implement this in weld-extensions using
JDK proxies, does this sound like a good idea?<br>
&gt;&gt;<br>
&gt;&gt; Stuart<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; seam-dev mailing list<br>
&gt;&gt; <a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
&gt;<br>
    <br>
    <br>
_______________________________________________<br>
seam-dev mailing list<br>
    <a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a><br>
    <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
    </div>
    </div>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Lincoln Baxter, III<br>
  <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
  <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&quot;Keep it Simple&quot;<br>
  <pre><fieldset></fieldset>
_______________________________________________
seam-dev mailing list
<a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a>
  </pre>
</blockquote>
<br>
</div></div></div>

</blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>