code: public static boolean isJBossRepositoryClassLoader(ClassLoader loader)
     {
        Class<?> clazz = loader.getClass();
        while (!clazz.getName().startsWith("java"))
        {
           if ("org.jboss.mx.loading.RepositoryClassLoader".equals(clazz.getName()))
              return true;
           clazz = clazz.getSuperclass();
        }
  
        return false;
     }
docs: Tests if this class loader is a JBoss RepositoryClassLoader
  
  @param loader
  @return