[jboss-user] [JBoss Seam] - Identity not injected into Stateful bean

michael.c.small do-not-reply at jboss.com
Thu May 17 12:15:14 EDT 2007


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


  | @Statefull
  | @Local(Authenticator.class)
  | @Name("authenticator")
  | 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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046544#4046544

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046544



More information about the jboss-user mailing list