2 Replies Latest reply on Apr 2, 2009 11:03 AM by siew yukimi

    IdentityManager - @Observer doesn't seem to work

    siew yukimi Newbie

      Hi, the @Observer doesn't seem to work in my code below:


      @In
      private IdentityManager identityManager;
              
      private Role newRole = new Role();  
            
      public void addRole(){
              try{
                      identityManager.createRole(newRole.getRolename());
                              
              }catch (Exception e) {
                      log.info("ERROR CREATING NEW USER ROLE: #0", e.getMessage());
              }               
      }
              
      @Observer("org.jboss.seam.security.management.prePersistUserRole")
      public void onPrePersistUserRole(Role role) {
              log.info("in observer");
      }



      The newRole.getRolename() is bind to a jsf input using value:
      UserRoleManager.newRole.rolename
      where UserRoleManager is the @Name of my class.


      The log in observer never printed out in Terminal. What's wrong? Please help.