title: Get session managed bean using CDI
body: <p>I have a managed bean which is in the session scope </p>
  
  <pre><code>@ManagedBean(name = "loginAction")
  @SessionScoped
  public class LoginAction implements OnReceiveListner, Serializable {}
  </code></pre>
  
  <p>In a servlet call i am getting this using</p>
  
  <pre><code>LoginAction loginAction = (LoginAction) request.getSession().getAttribute("loginAction");
  </code></pre>
  
  <p>Now I was wondering if i can call this using CDI for each session. Like</p>
  
  <pre><code>@Inject LoginAction loginAction(current session)
  </code></pre>
  
  <p>How can i do this</p>