How to clear elytron caching-realm using JMX Mbean in JBoss EAP 7+ ?

Solution Verified - Updated -

Issue

  • After moving from legacy security to Elytron, the existing code for the Mbean method to clear the caching-realm is not working. What is the equivalent method in Elytron for the code below ?
MBeanServerConnection mbeanServerConnection = (MBeanServerConnection) ManagementFactory.getPlatformMBeanServer();
ObjectName mbeanName = new ObjectName("jboss.as:subsystem=security,security-domain="+SECURITY_DOMAIN_NAME);
Object[] params = {userName};
String[] signature = {String.class.getName()};
mbeanServerConnection.invoke(mbeanName, "flushCache", params, signature);

Environment

  • Red Hat JBoss Enterprise Application Platform 7.1+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content