This content has been marked as final.
Show 1 reply
-
1. Re: DatabaseServerLoginModule caching the user ???
pmm Jul 28, 2014 3:44 AM (in response to suikast42)1 of 1 people found this helpfulIt works for us we use
<security-domain name="jboss-ejb-policy" cache-type="default">
We clear the cache using JMX. The can flush the whole cache if you remove the username argument.
private void flushPrincipalFromAuthenticationCache() { String objectName = "jboss.as:subsystem=security,security-domain=" + SECURITY_DOMAIN; Object[] params = {getUsername()}; String[] signature = {String.class.getName()}; try { MBeanServerConnection mbeanServerConnection = ManagementFactory.getPlatformMBeanServer(); ObjectName mbeanName = new ObjectName(objectName); mbeanServerConnection.invoke(mbeanName, SECURITY_MANAGER_FLUSH_AUTHENTICATION_CACHE, params, signature); } catch (JMException e) { log.warn("Could not find JASS security manager MBean: " + objectName, e); } catch (IOException e) { log.warn("Caught exception from invocation of JASS security manager MBean: " + objectName + ", operation: " + SECURITY_MANAGER_FLUSH_AUTHENTICATION_CACHE, e); } }