title: How does @SessionScoped work with EJB? Is CDI only for web-tier?
body: <p>How is the <strong>session</strong> defined in <code>@SessionScoped</code> CDI bean?<br>
  Is this annotation valid only when called from Servlet container, where the session is well defined in form of <code>HttpSession</code>?</p>
  
  <p>If not, than how an EJB with <code>@Inject @SessionScoped MyBean myBean</code> can know <strong>what the session really is</strong>? I mean, methods of this EJB could have been invoked by a standalone client, RESTful WS or by some other view.<br>
  What should happen in such case? Should the annotation have no meaning, should it inject fresh <code>MyBean</code> instance for each request or maybe it should retain the same instance across all requests?</p>