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