0 Replies Latest reply on Apr 2, 2010 5:30 AM by juergen.zimmermann

    How to migrate from JMX to Profile Service?

    juergen.zimmermann

      I'm using the following JMX based method to reset the authentication cache. How can I migrate this method and use the Profile Service of JBossAS 6.0.0.M2? Any hint is appreciated!

       

      MBeanServer server = MBeanServerFactory.findMBeanServer(null).get(0);

      ObjectName jaasSecurityManager = new ObjectName("jboss.security:service=JaasSecurityManager");

      Principal user = new SimplePrincipal(username);

      Object[] params = { loginDomainName, user };

      String[] paramTypes = { String.class.getName(), Principal.class.getName() };

       

      server.invoke(jaasSecurityManager, "flushAuthenticationCache", params, paramTypes);