title: Spring Security Login Failure
body: <p>I am using Spring Security 3.0.6 with JSF Mojarra 2.1.18 and Primefaces 3.5.</p>
  
  <p>I created a LoginManagedBean which injects the AuthenticationManager of Spring Security. </p>
  
  <pre><code> @ManagedBean
      @SessionScoped
      public class LoginManagedBean implements Serializable {
  
          private static final long serialVersionUID = 1L;
  
          private static transient final Log logger = LogFactory.getLog(LoginManagedBean.class);
  
          private LoginDTO login;
  
          private String username;
  
          private String password;
  
          @ManagedProperty(value = "#{authenticationManager}")
          private transient AuthenticationManager authenticationManager = null;
  
  ...
  </code></pre>
  
  <p>It works. But if login fails, I can never login again with correct values. I think I need to clear/reset the authenticationManager object but I dont know how. Any Suggestions? Thanks in advance!</p>