0 Replies Latest reply on Jan 20, 2004 4:58 AM by anbenham

    Flushing JAAS - Cache

    anbenham

       

      "anbenham" wrote:
      "anbenham" wrote:
      Hi,

      Thanx for you help !
      It has worked even for my custom principal
      This my code:
      String domain = "myApp"; //see jboss-web.xml
      MyCustomPrincipal user = getCustomPrincipal();
      String serverName = InetAddress.getLocalHost().getHostName();
       InitialContext ctx = new InitialContext();
       RMIAdaptor jbossServer = (RMIAdaptor) ctx.lookup("jmx/invoker/RMIAdaptor");
       ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
       Object[] params = { domain, user};
       String[] signature = { "java.lang.String", "java.security.Principal" };
       jbossServer.invoke(jaasMgr, "flushAuthenticationCache", params, signature);


      Regards