0 Replies Latest reply on Jun 27, 2005 2:01 AM by Vivek T

    Flush a specific cached entry for the given domain + princip

    Vivek T Newbie

      Hi,
      When i tried to flush all cached entries for a domain the JaasSecurityManagerService does it.

      But when i tried it for a speacific principal in the domain it did not flush from the cache.

      The following is the code snippet i got from the example and tried out.

      String domain = "jmx-console";
      Principal user = new SimplePrincipal("javaduke");
      ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
      Object[] params = {domain, user};
      String[] signature = {"java.lang.String", "java.security.Principal"};
      MBeanServer server = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
      server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);


      Please help me out. Thanks in advance.
      Vivek.