This content has been marked as final.
Show 1 reply
-
1. Re: How to fetch security domains defined in standalone-full-ha.xml in Wildfly 8.2.0 by coding
sridharthiyagarajan Jul 27, 2015 12:04 PM (in response to sridharthiyagarajan)Hello,
jboss.as:subsystem=security,security-domain=EncryptPassword is the object name for the security domain I created which is obtained by using JConsole.bat. There is an operation listCachedPrincipals returning an output of array of strings associated with that object.
I tried the below code to fetch created security domain information but got an error javax.management.InstanceNotFoundException: jboss.as:subsystem=security,security-domain=EncryptPassword'].
String[] output = (String[]) ManagementFactory.getPlatformMBeanServer().invoke(new ObjectName("jboss.as:subsystem=security,security-domain=EncryptPassword"), "listCachedPrincipals", null, null);
Could anyone please help me out if you have achieved this. Many thanks.