Ahh ok - We&#39;re talking about lookups on invocation, not injection -- got it. That could definitely be useful.<br><br><div class="gmail_quote">On Tue, Apr 20, 2010 at 12:55 PM, Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.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;">No, that is not the same as a fully stateless scope where the object is looked up everytime it is invoked, not everytime it is injected.<br>

<div><div></div><div class="h5"><br>
On 20 Apr 2010, at 17:07, Lincoln Baxter, III wrote:<br>
<br>
&gt; Ok yeah, thats what I thought.<br>
&gt;<br>
&gt; @Produces @New -- would that not work?<br>
&gt;<br>
&gt; On Tue, Apr 20, 2010 at 12:06 PM, Marius Bogoevici &lt;<a href="mailto:marius.bogoevici@gmail.com">marius.bogoevici@gmail.com</a>&gt; wrote:<br>
&gt; On 10-04-20 11:31 AM, Lincoln Baxter, III wrote:<br>
&gt;&gt; Wait -- there&#39;s no &quot;Prototype&quot; or &quot;always new&quot; scope?<br>
&gt; @Dependent or @New, from case to case.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; --Lincoln<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Apr 20, 2010 at 6:45 AM, Stuart Douglas &lt;<a href="mailto:stuart@baileyroberts.com.au">stuart@baileyroberts.com.au</a>&gt; wrote:<br>
&gt;&gt; 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>
&gt;&gt;<br>
&gt;&gt; Stuart<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 20/04/2010, at 8:15 PM, Pete Muir wrote:<br>
&gt;&gt;<br>
&gt;&gt; &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;&gt; &gt;<br>
&gt;&gt; &gt; I would like to hear from the 299 EG about this as well.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On 20 Apr 2010, at 04:57, Stuart Douglas wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; I think that there is a real use case for something similar to the @Unwrap feature of seam 2.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I think that it would be possible to implement something like this:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; @ConversationScoped<br>
&gt;&gt; &gt;&gt; public class ManagedPersistenceContext<br>
&gt;&gt; &gt;&gt; {<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; EntityManager entityManager;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; @Unwrap<br>
&gt;&gt; &gt;&gt; @SomeQualifier<br>
&gt;&gt; &gt;&gt; public EntityManager produce(InjectionPoint injectionPoint)<br>
&gt;&gt; &gt;&gt; {<br>
&gt;&gt; &gt;&gt;   entityManager.joinTransaction();<br>
&gt;&gt; &gt;&gt;   return entityManager;<br>
&gt;&gt; &gt;&gt; }<br>
&gt;&gt; &gt;&gt; }<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; public class MyClass<br>
&gt;&gt; &gt;&gt; {<br>
&gt;&gt; &gt;&gt; @Inject @SomeQualifier EntityManager entityManager;<br>
&gt;&gt; &gt;&gt; }<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &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; &gt;&gt;<br>
&gt;&gt; &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; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Stuart<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; seam-dev mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
&gt;&gt; &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;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; seam-dev mailing list<br>
&gt;&gt; <a href="mailto:seam-dev@lists.jboss.org">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;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Lincoln Baxter, III<br>
&gt;&gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt;&gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt;&gt; &quot;Keep it Simple&quot;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; seam-dev mailing list<br>
&gt;&gt;<br>
&gt;&gt; <a href="mailto:seam-dev@lists.jboss.org">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;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Lincoln Baxter, III<br>
&gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &quot;Keep it Simple&quot;<br>
&gt; _______________________________________________<br>
&gt; seam-dev mailing list<br>
&gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br>
</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>