/**
   * Used to register the method validation interceptor binding annotation.
   *
   * @param beforeBeanDiscoveryEvent event fired before the bean discovery process starts
   * @param beanManager the bean manager.
   */
  public void beforeBeanDiscovery(
      @Observes BeforeBeanDiscovery beforeBeanDiscoveryEvent, final BeanManager beanManager) {
    Contracts.assertNotNull(
        beforeBeanDiscoveryEvent, "The BeforeBeanDiscovery event cannot be null");
    Contracts.assertNotNull(beanManager, "The BeanManager cannot be null");

    // Register the interceptor explicitly. This way, no beans.xml is needed
    AnnotatedType<ValidationInterceptor> annotatedType =
        beanManager.createAnnotatedType(ValidationInterceptor.class);
    beforeBeanDiscoveryEvent.addAnnotatedType(annotatedType);
  }
 public void addStageConfig(@Observes BeforeBeanDiscovery bbd, BeanManager beanManager) {
   bbd.addAnnotatedType(beanManager.createAnnotatedType(ConfigurationValueProducer.class));
 }
  /**
   * Register all admin CDI beans.
   *
   * @param bbd the bbd event
   * @param bm the bean manager
   */
  public void register(@Observes BeforeBeanDiscovery bbd, BeanManager bm) {

    // Current API
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationManagerImpl.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationInterceptorMandatory.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationInterceptorNever.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationInterceptorNotSupported.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationInterceptorRequired.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationInterceptorRequiresNew.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensationInterceptorSupports.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(TxCompensateInterceptor.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(TxConfirmInterceptor.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(TxLoggedInterceptor.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CancelOnFailureInterceptor.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(CompensatableActionProducer.class));
    bbd.addAnnotatedType(bm.createAnnotatedType(DeserializersContainerProducer.class));
  }
 void registerApple(@Observes BeforeBeanDiscovery event, BeanManager manager) {
   event.addAnnotatedType(
       new AnnotatedTypeWrapper<Pear>(
           manager.createAnnotatedType(Pear.class), false, Juicy.Literal.INSTANCE));
 }
 public void addScope(@Observes final BeforeBeanDiscovery event) {
   event.addScope(ViewScoped.class, true, true);
 }
 public void beforBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager manager) {
   event.addScope(SOAPScoped.class, true, false);
 }