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"><<a href="mailto:marius.bogoevici@gmail.com">marius.bogoevici@gmail.com</a>></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's no "Prototype" or "always new" 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"><<a href="mailto:stuart@baileyroberts.com.au" target="_blank">stuart@baileyroberts.com.au</a>></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'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>
> 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>
><br>
> I would like to hear from the 299 EG about this as well.<br>
><br>
> On 20 Apr 2010, at 04:57, Stuart Douglas wrote:<br>
><br>
>> I think that there is a real use case for something similar to
the @Unwrap feature of seam 2.<br>
>><br>
>> I think that it would be possible to implement something like
this:<br>
>><br>
>> @ConversationScoped<br>
>> public class ManagedPersistenceContext<br>
>> {<br>
>><br>
>> EntityManager entityManager;<br>
>><br>
>> @Unwrap<br>
>> @SomeQualifier<br>
>> public EntityManager produce(InjectionPoint injectionPoint)<br>
>> {<br>
>> � entityManager.joinTransaction();<br>
>> � return entityManager;<br>
>> }<br>
>> }<br>
>><br>
>> public class MyClass<br>
>> {<br>
>> @Inject @SomeQualifier EntityManager entityManager;<br>
>> }<br>
>><br>
>> 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>
>><br>
>> I am pretty sure I can implement this in weld-extensions using
JDK proxies, does this sound like a good idea?<br>
>><br>
>> Stuart<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>
><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>
"Keep it Simple"<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>"Keep it Simple"<br>