[jboss-user] [Security & JAAS/JBoss] - Trying to get active users..
paulaunderwood
do-not-reply at jboss.com
Wed Oct 24 12:06:56 EDT 2007
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098401#4098401
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098401
More information about the jboss-user
mailing list