2 Replies Latest reply on Mar 21, 2003 12:00 AM by the_mike_d

    Can't flus cached security data in 3.0.6 but work in 3.0.0

    the_mike_d

      Hi,

      I've got flushing the security data in 3.0.0 to work, but in 3.0.6 i get the error jboss.security:name=JaasSecurityManager is not registered. Here is the code I am using, anyone have any ideas?

      thx,
      Mike

      InitialContext initialContext = new InitialContext();
      String serverName = System.getProperty("jbosstest.server.name");

      if (serverName == null)
      serverName = java.net.InetAddress.getLocalHost().getHostName();

      RMIAdaptor server = (org.jboss.jmx.adaptor.rmi.RMIAdaptor)initialContext.lookup("jmx:" + serverName + ":rmi");

      ObjectName jaasMgr = new ObjectName("jboss.security:name=JaasSecurityManager");
      Object[] params = { "MySqlRealm" };
      String[] signature = {"java.lang.String"};
      server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);