Hi, We have a Swing based GUI application that connects to a JBoss EJB server and we need to know if a user is already logged into the server. I'm looking at the getAuthenticationCachePrincipals method in the JMX bean JaasSecurityManager to return me a list of authenticated users. I've got the code working O.K. but the method always returns me an empty list.
| MBeanServerConnection server = MBeanServerConnection)ctx.lookup("jmx/rmi/RMIAdaptor"); | | ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager"); | | Object[] params = {p_strSecurityDomainName}; | | String[] signature = {"java.lang.String"}; | | List users = (List) server.invoke(jaasMgr, "getAuthenticationCachePrincipals", params, signature); I have double checked that the DefaultCacheTimeout is set to a non zero value. We are using a custom login module which extends the UsernamePasswordLoginModule....we are calling the super methods everywhere as well. Here is the entry in the login-config.xml file for our domain. <application-policy name="ucmslc"> | <authentication> | <login-module code="ucs.common.security.ucms.JBossLoginModule" flag="optional"> | <module-option name="applicationName">UCMS-LC</module-option> | <module-option name="principalUserRole">lccmsUser</module-option> | <module-option name="addSecurityGroupsAsRoles">false</module-option> | </login-module> | </authentication> | </application-policy> | Anybody ever get this method call working successfully? Thanks, Cliff View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970809#3970809 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970809 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user