code: @Override
      @FFDCIgnore({ ClassNotFoundException.class })
      public void validateEjbInjection(EJB ejb, CDIArchive injectionArchive, Class<?> injectionType) throws ClassCastException, CDIException {
  
          Collection<CDIArchive> moduleArchives = injectionArchive.getApplication().getModuleArchives();
          String applicationName = injectionArchive.getApplication().getName();
          String moduleName = injectionArchive.getName();
  
          for (CDIArchive archive : moduleArchives) {
              try {
  
                  EJBEndpoint endpoint = findEJBEndpoint(archive, ejb, injectionType, applicationName, moduleName);
  
                  if (endpoint != null) {
                      // Found it!
                      return;
                  }
              } catch (ClassNotFoundException e) {
                  // Could not find the class, even though it should be in this module
                  // Give up looking but don't fail validation
                  return;
              } catch (ClassCastException e) {
                  // Found the EJB and it's the wrong type
                  // Throw on this exception to be handled by the caller
                  throw e;
              }
  
              //TODO what happens if the endpoint is not found in any of the archives??
          }
      }
docs: {@inheritDoc}
  
  @throws CDIException