With JBossAS 4.x I flushed the AuthenticationCache via JMX:
Context ctx = new InitialContext();
MBeanServerConnection server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
server.invoke(new ObjectName("jboss.security", "service", "JaasSecurityManager"),
"flushAuthenticationCache",
new String[] { "mySecurityDomain" },
new String[] { "java.lang.String" });
Does JBossAS 5.1.x provide an alternative way by using the new ProfileService and/or DeploymentManager? Any hint is appreciated!