<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    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.<br>
    <br>
    <div class="moz-cite-prefix">On 12/08/2014 07:20 PM, arjan tijms
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAE=-AhAr6tqBgAPiQ1gHXKy1ZQZTC+_G5m9S9Cw26kt1OtKJLA@mail.gmail.com"
      type="cite">Hi,
      <div><br>
      </div>
      <div>I agree that there should be two instances of the stateful
        bean, so GF3/EAP6 is correct.</div>
      <div><br>
      </div>
      <div>It's remarkable then that seemingly GF4 and WF8 have the
        exact same integration regression.</div>
      <div><br>
      </div>
      <div>At any length this would be a good case for adding an extra
        test to the TCK ;)</div>
      <div><br>
      </div>
      <div>Kind regards,</div>
      <div>Arjan<br>
        <br>
        On Monday, December 8, 2014, Jozef Hartinger &lt;<a
          moz-do-not-send="true" href="mailto:jharting@redhat.com">jharting@redhat.com</a>&gt;
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div text="#000000" bgcolor="#FFFFFF"> 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<br>
            <br>
            <div>On 12/08/2014 06:08 PM, Steve Millidge wrote:<br>
            </div>
            <blockquote type="cite">
              <div>
                <p class="MsoNormal">Hi </p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">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;</p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">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;</p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">On GFv3 and JBoss EAP 6 the method
                  returns "init" implying we have 2 separate SFSB
                  instances.</p>
                <p class="MsoNormal">and on GFv4 and WildFly the method
                  returns "stateFromFirst" implying there is 1 SFSB
                  instance. </p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">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.</p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal">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?</p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">@RequestScoped</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">public
                    class Injection {</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    @Inject</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">   
                    StatefulService first;</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;"> </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">   
                    @Inject</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">   
                    StatefulService second;</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    public

                    String invokeStatefulService(){</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">       
                    first.setState("stateFromFirst");</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">       
                    return second.getState();</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    }</span></p>
                <p class="MsoNormal"><span>}</span></p>
                <p class="MsoNormal"><span> </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">@Stateful</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">public
                    class StatefulService {</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    private

                    String state;</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    @PostConstruct</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">   
                    public void init(){</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">       
                    this.state = "init";</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    }</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;"> </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">   
                    public void setState(String state) {</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">       
                    this.state = state;</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    }</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;"> </span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">   
                    public String getState() {</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">       
                    return state;</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">    }</span></p>
                <p class="MsoNormal" style="text-autospace:none"><span
                    style="font-family:&quot;Courier New&quot;">}</span></p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal"> </p>
                <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY">Steve Millidge</span><span><br>
                  </span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY">Director</span></p>
                <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY">C2B2</span><span><br>
                  </span><b><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                      lang="CY">The Leading Independent Middleware
                      Experts.</span></b><span> </span><span><br>
                  </span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY">T: 08450 539457</span><span lang="CY"> </span><b><span
                      style="color:#1f497d">|</span></b><span> </span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY">M: 07920 100626</span><span lang="CY"> </span><b><span
                      style="color:#1f497d">|</span></b><span> </span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY">W: </span><span
style="font-size:10.0pt;font-family:&quot;Arial&quot;,sans-serif;color:#1f497d"
                    lang="CY"><a moz-do-not-send="true"
                      href="http://www.c2b2.co.uk/" target="_blank"><span
style="font-family:&quot;Verdana&quot;,sans-serif;color:blue">www.c2b2.co.uk</span></a></span><span
                    lang="CY"> </span><b><span style="color:#1f497d">|</span></b><span>
                  </span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,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"><span style="color:blue">smillidge@c2b2.co.uk</span></a></span><span></span></p>
                <p class="MsoNormal"><span><img
                      src="cid:part4.09070001.04090205@redhat.com"
                      alt="Main SIgnature May 14" width="896"
                      height="136" border="0"></span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY"><br>
                  </span><span
style="font-size:7.5pt;font-family:&quot;Verdana&quot;,sans-serif;color:#548dd4">---------------------------------------------------------------------------------------------------------------</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY"><br>
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">C2B2 Consulting Limited</span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif">,
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">Malvern Hills Science Park</span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif">,
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">Geraldine Road</span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif">,
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">Malvern</span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif">,
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">Worcestershire</span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif">,
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">WR14 3SZ</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY"><br>
                  </span><span
                    style="font-size:7.0pt;font-family:&quot;Verdana&quot;,sans-serif"
                    lang="CY">Registered in England and Wales: 4563419,
                    Registered Office: Ardendale, Old Hollow, Malvern,
                    Worcestershire</span><span
style="font-size:10.0pt;font-family:&quot;Verdana&quot;,sans-serif;color:#1f497d"
                    lang="CY"></span></p>
                <p class="MsoNormal"> </p>
              </div>
              <br>
              <fieldset></fieldset>
              <br>
              <pre>_______________________________________________
cdi-dev mailing list
<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>
<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>

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.</pre>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>