1 Reply Latest reply on Oct 25, 2007 9:37 PM by LeQuoc Thai

    Trying to get active users..

    Paula Newbie

      I have this in a file called GetActiveUsersAction.java..

      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" };
       activeUsers = (List<User>) server.invoke(jaasMgr, "getAuthenticationCachePrincipals", params, signature);
      


      My list always comes back with a 0 length.. Am I missing something?

      Also, what exactly does this return.. I know a list.. but what information about the user does it return? I haven't been able to find an explanation other than to use the code above. We would like to have a page that will show all the users logged into our system.

      Thanks,
      Paula