code: @Override
      /** {@inheritDoc} */
      public void addMBeanServers(Set<MBeanServerConnection> servers) {
          try {
              Class locatorClass = Class.forName("org.jboss.mx.util.MBeanServerLocator");
              Method method = locatorClass.getMethod("locateJBoss");
              servers.add((MBeanServer) method.invoke(null));
          } catch (ClassNotFoundException e) { /* Ok, its *not* JBoss 4,5 or 6, continue with search ... */ } catch (NoSuchMethodException e) {
          } catch (IllegalAccessException e) {
          } catch (InvocationTargetException e) {
          }
      }
docs: Special handling for JBoss