<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Yes, it works fine on both 2.2.7.Final and 2.2.8.Final<br>
<br>
<div class="moz-cite-prefix">On 12/09/2014 11:22 AM, Steve Millidge
wrote:<br>
</div>
<blockquote
cite="mid:AMSPR03MB30508F96819DCC907423F7E91650@AMSPR03MB305.eurprd03.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi
Jozef,<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks
for that is it passing on 2.2.7.Final ?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Steve<o:p></o:p></span></p>
<p class="MsoNormal"><a moz-do-not-send="true"
name="_MailEndCompose"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
lang="EN-US">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext"
lang="EN-US"> Jozef Hartinger
[<a class="moz-txt-link-freetext" href="mailto:jharting@redhat.com">mailto:jharting@redhat.com</a>]
<br>
<b>Sent:</b> 09 December 2014 09:24<br>
<b>To:</b> arjan tijms<br>
<b>Cc:</b> Steve Millidge; <a class="moz-txt-link-abbreviated" href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<b>Subject:</b> Re: [cdi-dev] Unexplained change in
behavior between Java EE 6 and Java EE 7<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Actually it
passes on WF8/9 with the latest version of Weld but fails with
older ones so it seems that it was a regression in Weld after
all. Sorry for confusion.<o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/08/2014 07:20 PM, arjan tijms
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I agree that there should be two
instances of the stateful bean, so GF3/EAP6 is correct.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">It's remarkable then that seemingly GF4
and WF8 have the exact same integration regression.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">At any length this would be a good case
for adding an extra test to the TCK ;)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Arjan<br>
<br>
On Monday, December 8, 2014, Jozef Hartinger <<a
moz-do-not-send="true" href="mailto:jharting@redhat.com">jharting@redhat.com</a>>
wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC
1.0pt;padding:0cm 0cm 0cm
6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi
Steve,<br>
<br>
this is not caused by a change in the specification
nor in Weld. It is probably a regression in GlassFish
integration. The correct behavior is the former (2
instances) as that is aligned with how @Dependent
instances work in general. If you need the bean
instance to be shared across injection points, you can
give it a scope other than @Dependent.<br>
<br>
HTH,<br>
<br>
Jozef<o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/08/2014 06:08 PM, Steve
Millidge wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi
<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">We
are investigating a change in behaviour between
Java EE 6 and Java EE 7 and were wondering if this
is a bug or a specification change;<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If
there is a RequestScoped bean and SFSB like below,
and I call invokeStatefulService() on the Request
Scoped Bean the behaviour changes depending on
Java EE version;<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On
GFv3 and JBoss EAP 6 the method returns "init"
implying we have 2 separate SFSB instances.<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">and
on GFv4 and WildFly the method returns
"stateFromFirst" implying there is 1 SFSB
instance.
<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I
would’ve imagined that the second result i.e. 1
SFSB as there is 1 client bean which exists for
the duration of the call is the correct behaviour.
However I am not sure.<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">As
both appservers above use JBoss Weld for CDI is
this a Weld bug or did the behaviour change
between Java EE 6 and Java EE 7?<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">@RequestScoped</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">public
class Injection {</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> @Inject</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
StatefulService first;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
@Inject</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
StatefulService second;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> public
String invokeStatefulService(){</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
first.setState("stateFromFirst");</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
return second.getState();</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
}</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">}<o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">@Stateful</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">public
class StatefulService {</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> private
String state;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> @PostConstruct</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
public void init(){</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
this.state = "init";</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
}</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
public void setState(String state) {</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
this.state = state;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
}</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New""> </span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
public String getState() {</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
return state;</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">
}</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none"><span
style="font-family:"Courier New"">}</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">Steve Millidge</span><br>
<span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">Director</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">C2B2</span><br>
<b><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">The Leading Independent Middleware
Experts.</span></b> <br>
<span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">T: 08450 539457</span><span lang="CY">
</span><b><span style="color:#1F497D">|</span></b>
<span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">
M: 07920 100626</span><span lang="CY"> </span><b><span
style="color:#1F497D">|</span></b>
<span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">
W: </span><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"
lang="CY"><a moz-do-not-send="true"
href="http://www.c2b2.co.uk/" target="_blank"><span
style="font-family:"Verdana",sans-serif">www.c2b2.co.uk</span></a></span><span
lang="CY">
</span><b><span style="color:#1F497D">|</span></b>
<span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY">
E: <a moz-do-not-send="true"
href="javascript:_e(%7B%7D,'cvml','smillidge@c2b2.co.uk');"
target="_blank">
smillidge@c2b2.co.uk</a></span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><img
id="_x0000_i1025"
src="cid:part5.07050700.01050206@redhat.com"
alt="Main SIgnature May 14" width="896"
height="136" border="0"><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY"><br>
</span><span
style="font-size:7.5pt;font-family:"Verdana",sans-serif;color:#548DD4">---------------------------------------------------------------------------------------------------------------</span><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY"><br>
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">C2B2 Consulting Limited</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif">,
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">Malvern Hills Science Park</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif">,
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">Geraldine Road</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif">,
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">Malvern</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif">,
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">Worcestershire</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif">,
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">WR14 3SZ</span><span
style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D"
lang="CY"><br>
</span><span
style="font-size:7.0pt;font-family:"Verdana",sans-serif"
lang="CY">Registered in England and Wales:
4563419, Registered Office: Ardendale, Old
Hollow, Malvern, Worcestershire</span><o:p></o:p></p>
<p class="MsoNormal"
style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>cdi-dev mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="javascript:_e(%7B%7D,'cvml','cdi-dev@lists.jboss.org');" target="_blank">cdi-dev@lists.jboss.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a moz-do-not-send="true" href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<br>
</body>
</html>