<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 10-04-20 11:31 AM, Lincoln Baxter, III wrote:
<blockquote
cite="mid:x2ua3f2f0581004200831u4cca3db1h5401afad9924d576@mail.gmail.com"
type="cite">Wait -- there's no "Prototype" or "always new" scope?<br>
</blockquote>
@Dependent or @New, from case to case.<br>
<blockquote
cite="mid:x2ua3f2f0581004200831u4cca3db1h5401afad9924d576@mail.gmail.com"
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 moz-do-not-send="true"
href="mailto:stuart@baileyroberts.com.au">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 class="h5"><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 moz-do-not-send="true"
href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
>> <a moz-do-not-send="true"
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 moz-do-not-send="true" href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
<a moz-do-not-send="true"
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 moz-do-not-send="true" href="http://ocpsoft.com">http://ocpsoft.com</a><br>
<a moz-do-not-send="true" href="http://scrumshark.com">http://scrumshark.com</a><br>
"Keep it Simple"<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
seam-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/seam-dev">https://lists.jboss.org/mailman/listinfo/seam-dev</a>
</pre>
</blockquote>
<br>
</body>
</html>