3 Replies Latest reply on Apr 29, 2003 10:26 AM by Adrian Brock

    Please help with this....authentication remembered all the t

    nvinaya1 Newbie

      I am getting stuck with this thing....
      when i authenticate a user the first time, jboss remembers it for subsequent calls and i keep getting 403 error...
      i inserted the following code in one of the servlets to flush out the cache...
      import javax.management.*;
      java.util.ArrayList servers = MBeanServerFactory.findMBeanServer(null);
      if (servers.size() != 1)
      throw new EJBException("Not exactly one server found");
      MBeanServer mbeanServer = (MBeanServer) servers.get(0);
      String[] params = { "java:/jaas/ecommerce" };
      String[] signature = { "java.lang.String" };
      try { ObjectName name = new ObjectName("Security", "name", "JaasSecurityManager");
      mbeanServer.invoke(name, "flushAuthenticationCache", params, signature);
      }
      catch (Exception e) { e.printStackTrace(); throw new EJBException(e); }

      But it gives an error saying that there is no cache policy for the domain java:/jaas/ecommerce...
      where should i specify the cache policy...
      please help me with this....