Package com.caucho.config.inject

Examples of com.caucho.config.inject.BeanFactory.binding()


    BeanFactory factory = beanManager.createBeanFactory(_object.getClass());

    if (name != null) {
      factory.name(name);
      factory.binding(CurrentLiteral.CURRENT);
      factory.binding(Names.create(name));
    }

    // server/12dt
    // for backward compatibility <resource> is always ApplicationScoped
View Full Code Here


    BeanFactory factory = beanManager.createBeanFactory(_object.getClass());

    if (name != null) {
      factory.name(name);
      factory.binding(CurrentLiteral.CURRENT);
      factory.binding(Names.create(name));
    }

    // server/12dt
    // for backward compatibility <resource> is always ApplicationScoped
    factory.scope(ApplicationScoped.class);
View Full Code Here

      if (getName() != null) {
        Jndi.bindDeepShort(getName(), connectionFactory);

        factory.name(getName());
        factory.binding(Names.create(getName()));
        // server/30i0
        factory.binding(CurrentLiteral.CURRENT);
      }

      Bean bean = factory.singleton(connectionFactory);
View Full Code Here

        Jndi.bindDeepShort(getName(), connectionFactory);

        factory.name(getName());
        factory.binding(Names.create(getName()));
        // server/30i0
        factory.binding(CurrentLiteral.CURRENT);
      }

      Bean bean = factory.singleton(connectionFactory);

      manager.addBean(bean);
View Full Code Here

      addOptionalStringProperty("name", getName());
    }

    for (Annotation binding : getBindingList()) {
      factory = factory.binding(binding);
    }

    for (Annotation stereotype : getStereotypeList()) {
      factory = factory.stereotype(stereotype.annotationType());
    }
View Full Code Here

    */
    for (Annotation binding : annotated.getAnnotations()) {
      Class bindingType = binding.annotationType();
     
      if (bindingType.isAnnotationPresent(Qualifier.class))
        factory.binding(binding);
    }

    _beanManager.addBean(factory.singleton(proxy));

    event.veto();
View Full Code Here

      if (getName() != null) {
  Jndi.bindDeepShort(getName(), connectionFactory);

  factory.name(getName());
  // server/30b4
  factory.binding(Names.create(getName()));
  factory.binding(CurrentLiteral.CURRENT);
      }
     
      manager.addBean(factory.singleton(connectionFactory));
    }
View Full Code Here

  Jndi.bindDeepShort(getName(), connectionFactory);

  factory.name(getName());
  // server/30b4
  factory.binding(Names.create(getName()));
  factory.binding(CurrentLiteral.CURRENT);
      }
     
      manager.addBean(factory.singleton(connectionFactory));
    }
  }
View Full Code Here

          public Class annotationType() { return Startup.class; }
        });
    }

    for (Annotation binding : _bindingList) {
      factory.binding(binding);
    }

    for (Annotation stereotype : _stereotypeList) {
      factory.stereotype(stereotype.annotationType());
    }
View Full Code Here

    InjectManager webBeans = InjectManager.create();
    BeanFactory factory = webBeans.createBeanFactory(value.getClass());
    factory.name(_name);
    // server/1516
    factory.binding(Names.create(_name));

    webBeans.addBean(factory.singleton(value));

    Jndi.bindDeepShort(_name, value);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.