I am running JBOSS Eap 6.4 , I want to set log level dynamically by JBOSS MBean, I tried following code
ObjectName objectName = new ObjectName("jboss.as:subsystem=logging,logger=com.test");
MBeanServer server = java.lang.management.ManagementFactory.getPlatformMBeanServer();
String[] signatures = new String[]{"java.lang.String.class"};
Object[] args = new Object[]{level};
String serviceName = "changeLogLevel";
server.invoke(objectName, serviceName, args, signatures);
It works in standalone mode , but it says serviceName changeLogLevel not found when executed in domain mode.
What can be the correct string to pass in ObjectName .