title: Bean instance of a shorter scope injected in a bean instance of a larger scope in CDI - how does it work?
body: <p>Consider the following request-scoped CDI bean:</p>
  
  <pre><code>@RequestScoped
  public class RequestScopedBean {
      // ...
  }
  </code></pre>
  
  <p>Now, I inject it in a application-scoped bean:</p>
  
  <pre><code>@ApplicationScoped
  public class ApplicationScopedBean {
      @Inject private RequestScopedBean requestScopedBean;
      // ...
  }
  </code></pre>
  
  <p>I ran this code and noted that the request-scoped bean instance is different between two requests but the application-scoped bean instance is the same. My doubt is: how does this work? Is the request-scoped bean instance reattributed to the application-scoped field at each request? Or the proxy of the application-scoped bean just changes between requests?</p>