1 Reply Latest reply on Nov 7, 2005 9:55 AM by Scott Stark

    How to restrict multiple Logins for same user

    SivaKumar N Newbie

      we need to restrict multiple login for same user i hav got the list of currently Logged user using the following code

      MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
      String jaasMgrName = "jboss.security:service=JaasSecurityManager";
      ObjectName jaasMgr = new ObjectName(jaasMgrName);
      Object[] params = { "SecurityPolicy" };
      String[] signature = { "java.lang.String" };
      loggedUsers = (List) server.invoke(jaasMgr, "getAuthenticationCachePrincipals", params, signature);

      But i could able to login more than once with the same username in the list.Is it possible to restrict the user to login only once with simple JAAS Configuration changes.