1 Reply Latest reply on Jul 24, 2012 3:20 AM by sudhananthan B

    MBean related to JAAS authentication is not present

    sudhananthan B Newbie

      I'm working on jboss 7 upgradation from jboss 5.

       

      I ran into an issue while getting the user list using MBean that is available in jboss 5. But that MBean is not available in jboss as 7. The code i've used to get user principal list is given below:

       

      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" };

              List<SimplePrincipal> loggedusers = (List<SimplePrincipal>) server.invoke(jaasmgr, "getAuthenticationCachePrincipals", params, signature);

       

       

      Please any one help me in getting the correct solution to do the above thing  in jboss as 7.