API To Query MBean RoleCategorySeedMBean


package com.mbeans;
import javax.management.MBeanInfo;
import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;

import com.connection.GetJMXConnector;
public class MBeanForRoleCategorySeedMBean {
 public static void main(String[] args) throws Exception {
  
  
  JMXConnector connector = GetJMXConnector.getJMXConnection();
  MBeanServerConnection conn = connector.getMBeanServerConnection();
  
  ObjectName name = new ObjectName("oracle.iam:Location=oim_server1,name=RoleCategorySeedMBean,type=IAMAppRuntimeMBean,Application=oim,ApplicationVersion=11.1.2.0.0");

  MBeanInfo mbi = conn.getMBeanInfo(name);
  MBeanOperationInfo[] mboarr = mbi.getOperations();

  for (int i = 0; i < mboarr.length; i++) {
   MBeanOperationInfo mbo = mboarr[i];
   System.out.println(mbo.getName());
   String retType = mbo.getReturnType();
   System.out.println("\t" + retType);
   MBeanParameterInfo[] params = mbo.getSignature();
   for (int j=0 ; j<params.length ; j++) {
    MBeanParameterInfo p = params[j];
    System.out.println("\t" + p.getName() + " " + p.getType() + " " + p.getClass());
   }
  }
  
 }
}

No comments:

Post a Comment

About OIM

Oracle Identity Management enables organizations to effectively manage the end - to - end life - cycle of user ide...

Popular Posts