<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">please see inline.<br>
      <br>
      On 04/12/14 10:30, arjan tijms wrote:<br>
    </div>
    <blockquote
cite="mid:CAE=-AhCT3jzLZ2ZP+GxFsawycxnt5K-0Wq_40D-OqYp-THT-Lw@mail.gmail.com"
      type="cite">Hi there,<br>
      <br>
      On Thursday, December 4, 2014, Pavel Bucek &lt;<a
        moz-do-not-send="true" href="mailto:pavel.bucek@oracle.com">pavel.bucek@oracle.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">
          <div>Hello Arjan,<br>
            <br>
            On 03/12/14 19:44, arjan tijms wrote:<br>
          </div>
          <blockquote type="cite">Hi,<br>
            <br>
            On Wednesday, December 3, 2014, Pavel Bucek &lt;<a
              moz-do-not-send="true"
              href="javascript:_e(%7B%7D,'cvml','pavel.bucek@oracle.com');"
              target="_blank">pavel.bucek@oracle.com</a>&gt; wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
              <br>
              I'm trying to figure out how to solve issue in JSR 356 -
              Java API for<br>
              WebSocket, related to CDI scope usable from WebSocket
              endpoints. Problem<br>
              is, that "standard" scopes do not apply, because there is
              no<br>
              @RequestScoped (http response is already sent),
              HttpSession does not<br>
              need to be created and the rest does not seem to be
              applicable, ...<br>
              <br>
              I believe that CDI specification should define
              @UpgradeScoped, which<br>
              would cover usages of HttpUpgradeHandler from Servlet API.
              (Similarly as<br>
              it does for @RequestScoped, @SessionScoped, ... )</blockquote>
            <div><br>
            </div>
            Wouldn't it be a better option to have WebSocket define that
            scope, using CDI to implement it? <br>
          </blockquote>
          <br>
          That is one possibility, but @UpgradeScoped would be more
          general than just for WebSocket - it would apply for all
          HTTP/1.1+ Upgrade applications.</div>
      </blockquote>
      <div> </div>
      <div>Okay, so in a more broader application than just WebSocket it
        could be defined somewhere lower in the spec hierarchy. If it's
        specific to HTTP upgrades as you mention, then Servlet may be
        the next candidate to consider.</div>
    </blockquote>
    <br>
    As you most likely already know, Servlet spec does not contain any
    scope definition (yet). The natural way for me is to add the new
    stuff somewhere near the "old" declaration, which would seem logical
    for all users. (please see below for comment to possible move of
    these declarations to Servlet spec).<br>
    <br>
    <blockquote
cite="mid:CAE=-AhCT3jzLZ2ZP+GxFsawycxnt5K-0Wq_40D-OqYp-THT-Lw@mail.gmail.com"
      type="cite">
      <blockquote class="gmail_quote" style="margin:0 0 0
        .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <div text="#000000" bgcolor="#FFFFFF"> In my eyes, it is
          something which was forgotten to do in Java EE 7 release,
          since HttpUpgradeHandler was introduced in it.<br>
          <br>
          Also please note, that other Servlet related scopes are
          already in CDI spec, so it seems like it belongs there more
          than anywhere else. </div>
      </blockquote>
      <div><br>
      </div>
      <div>But some of these may not actually belong there. They may
        have been put there originally since as a new spec that had yet
        to be proven, CDI could not right away ask other specs to
        support it.</div>
      <div><br>
      </div>
      <div>There are discussions going on to move some of the Servlet
        things from CDI to Servlet.</div>
    </blockquote>
    <br>
    Do you know about thread like that somewhere? (CDI / Servlet mailing
    list)? I'm for moving this to Servlet, since it seems like it should
    belong there, but current scope definitions are well established and
    known and deprecating/moving the @*Scoped declarations might not be
    perceived as positive change. Anyway, I'd like to joint that
    discussion to make sure that the new scope will be introduced.<br>
    <br>
    <blockquote
cite="mid:CAE=-AhCT3jzLZ2ZP+GxFsawycxnt5K-0Wq_40D-OqYp-THT-Lw@mail.gmail.com"
      type="cite">
      <div> </div>
      <blockquote class="gmail_quote" style="margin:0 0 0
        .8ex;border-left:1px #ccc solid;padding-left:1ex">
        <div text="#000000" bgcolor="#FFFFFF"> This might have multiple
          reasons - for example, you can easily define relationship
          between @UpgradeScoped and others, already existing ones. In
          this sense, CDI specification now depends on Servlet API (it
          references some of the classes defined in it), but Servlet
          does not do that for CDI. I don't think that Servlet spec
          should introduce similar dependency just because of new scope.</div>
      </blockquote>
      <div><br>
      </div>
      <div>There are plenty of other reasons too ;) For Servlet I expect
        the dependencies to be optional. Servlet in a EE environment
        will then provide scope X &amp; Y, and producers for types Q
        &amp; R, but it will continue to run standalone without needing
        any CDI. In short, it would provides things for CDI then but in
        its core wouldn't need CDI.</div>
      <div><br>
      </div>
      <div>Just my 2 cents ;)</div>
    </blockquote>
    Thanks! :-)<br>
    <br>
  </body>
</html>