1 Reply Latest reply on Apr 22, 2009 10:36 AM by cash1981

    alreadyLoggedIn never fired

    cash1981

      Hello.


      I have the following code:



      @Observer("org.jboss.seam.security.alreadyLoggedIn")
          public void alreadyLoggedIn() {
               //If we have a user still
               SystemLog sysLog = new SystemLog();
               sysLog.setCategory(Messages.instance().get("security"));
               sysLog.setUsername((currentUser == null ? "" : currentUser.getUsername()));
               sysLog.setDescription(Messages.instance().get("user.alreadyLoggedIn"));
               sysLog.setDate(new Date());
               entityManager.persist(sysLog);
               
               //Logout the user and throw exception
      //         Identity.instance().logout();
      //         throw new Exception("User already logged in");
          }



      However the event never fires. I try to log in with the same username and password while the other user still is active, but the event isnt fire. Anybody ever made this event work?
      What am I doing wrong?


      I have many different events like loginFailed and loggedOut, and these work just fine