code: protected Set<ObjectName> searchMBeans(MBeanServerExecutor pMBeanServerExecutor, String pMbeanPattern) {
          try {
              ObjectName oName = new ObjectName(pMbeanPattern);
              return pMBeanServerExecutor.queryNames(oName);
          } catch (MalformedObjectNameException e) {
              return new HashSet<ObjectName>();
          } catch (IOException e) {
              return new HashSet<ObjectName>();
          }
      }
docs: Check for the existence of a certain MBean. All known MBeanServers are queried
  
  @param pMBeanServerExecutor mbean servers to query for
  @param pMbeanPattern MBean name pattern for MBeans to check for
  @return set of {@link ObjectName}s if the pattern matches, or an empty set if not mbean has been found