@Override
  public void setManagedResource(Object resource, String resourceType) throws MBeanException,
      RuntimeOperationsException, InstanceNotFoundException, InvalidTargetObjectTypeException {
    if (resource == null) {
      throw new RuntimeOperationsException(new IllegalArgumentException(
          "Managed resource cannot be null."));
    }
    if (!isResourceTypeSupported(resourceType)) {
      throw new InvalidTargetObjectTypeException(resourceType);
    }

    Logger logger = getLogger();
    if (logger.isEnabledFor(Logger.DEBUG)) {
      logger.debug("Setting managed resource to be: " + resource);
    }
    m_managedResource = resource;
  }
@author <a href="mailto:biorn_steedom@users.sourceforge.net">Simone Bordet</a>
@version $Revision: 1.14 $
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/MX4JModelMBean.java