6 Replies Latest reply on Aug 5, 2009 11:20 PM by Leo -

    Extending Identity

    Leo - Newbie

      Hi!!


      I'm working with jboss 4.2.2 and seam 2.0.1GA.
      I started creating a Seam Web Project using Jboss Tools 2.0.0, and now I'm trying to extend Identity.
      So I am following this guide  from Jboss docs.


      I've created my custom Identity, but when I start my app I'm getting this error:


      java.lang.IllegalArgumentException: no such setter method: CustomIdentity.securityRules


      My CustomIdentity.java is something like this



      @Name("org.jboss.seam.security.identity")
      @Scope(SESSION)
      @Install(precedence = APPLICATION)
      @BypassInterceptors
      @Startup
      public class CustomIdentity extends Identity {
           
           private Long userId;     
           @Logger private Log log;
           
           @Override
           public boolean isLoggedIn() {
                log.info("---------------------------- is LoggedIn ");
                return super.isLoggedIn() && isCustomLoggedIn();
           }
           public Long getUserId() {
                return userId;
           }
           public void setUserId(Long userId) {
                this.userId = userId;
           }     
              private boolean isCustomLoggedIn(){
                       return userId!=null;
               
              }
      }




      Any idea?


      Thanks in advance.