9 Replies Latest reply on May 17, 2007 5:11 PM by Monkey Den

    Identity not injected into Stateful bean

    Michael Small Newbie

      I'm using the simply authentication as described in Seam documentation. I have Stateful Session Bean as follows:

      public class AuthenticatorImp implements Authenticator
       private String loginId;
       private String password;
       @In(value="#{identity.username}", required=true)
       public void setLoginId(String loginId) ...
       @In(value="#{identity.password}", required=true)
       public void setPassword(String password) ...
       public boolean authenticate()
       log.info("loginId: " + this.loginId);
       log.info("password: " + this.password);

      If I excute this, the authenticate gets called but loginId and password are always null. If, however, I make the component a regular JavaBean, then the injection works. What gives?