5 Replies Latest reply on Apr 22, 2009 10:55 AM by cash1981

    Event org.jboss.seam.security.alreadyLoggedIn doesnt work

    cash1981

      In the seam documentation it says:


      Event key: org.jboss.seam.security.alreadyLoggedIn
      Raised when a user that is already authenticated attempts to log in again.


      But this is never fired.
      I have this listener:



        @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 SaksappException("Brukeren er allerede logget inn");
          }



      Why doesnt this work?