0 Replies Latest reply on Apr 6, 2016 10:03 AM by valsaraj007

    JBAS011342: No operation called 'flush-cache'

    valsaraj007

      Hi,

       

      I am getting error "JBAS011342: No operation called 'flush-cache'" while running following code in wildfly-8.2.0 in domain mode:

      public void clearCache(String username){

          try {

             ObjectName jaasMgr = new ObjectName("jboss.as:subsystem=security,security-domain=appLDAP" );

             Object[] params = {username};

             String[] signature = {"java.lang.String"};

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

             server.invoke(jaasMgr, "flushCache", params, signature);

             TolvenLogger.info("################ Cleared cache for " + username, this.getClass());

          } catch (Exception ex) {

             ex.printStackTrace();

          }

          }

      First login works from login module and for subsequent logins, it is from cache. The problem is cache not getting updated on user credential updates. What is the correct method to invalidate cache.

       

      Thanks!