예제 #1
0
 public void validateProducer(Producer<?> producer) {
   if (container.getState().equals(ContainerState.VALIDATED)
       || container.getState().equals(ContainerState.INITIALIZED)) {
     // We are past the bootstrap and therefore we can validate the producer immediately
     validator.validateProducer(producer, beanManager);
   } else {
     // Validate injection points for definition errors now
     for (InjectionPoint ip : producer.getInjectionPoints()) {
       validator.validateInjectionPointForDefinitionErrors(ip, ip.getBean(), beanManager);
       validator.validateEventMetadataInjectionPoint(ip);
     }
     // Schedule validation for deployment problems to be done later
     producersToValidate.add(producer);
   }
 }
예제 #2
0
 public void validate() {
   validator.validateProducers(producersToValidate, beanManager);
   producersToValidate.clear();
 }