Package com.caucho.config.inject

Examples of com.caucho.config.inject.InjectManager.resolve()


        beanSet = webBeans.getBeans(destinationType);

      Object destComp = null;

      if (beanSet.size() > 0) {
        Bean destBean = webBeans.resolve(beanSet);
        CreationalContext env = webBeans.createCreationalContext(destBean);

        destComp
          = webBeans.getReference(destBean, destBean.getBeanClass(), env);
      }
View Full Code Here


      bean.setDestinationValue((Destination) destComp);

      beanSet = webBeans.getBeans(ConnectionFactory.class);

      Bean factoryBean = webBeans.resolve(beanSet);
      CreationalContext env = webBeans.createCreationalContext(factoryBean);

      Object comp = webBeans.getReference(factoryBean);

      if (comp == null)
View Full Code Here

    }
    else {
      beans = beanManager.getBeans(type);
    }
   
    Bean<?> bean = beanManager.resolve(beans);
   
    if (bean == null) {
      throw new ConfigException(L.l("'{0}' with name='{1}' is an unknown JMS resource",
                                    type.getName(), name));
    }
View Full Code Here

    InjectManager beanManager = InjectManager.create();
   
    Set<Bean<?>> beans = beanManager.getBeans(DataSource.class, named);
   
    if (beans != null && beans.size() > 0) {
      return (DataSource) beanManager.getReference(beanManager.resolve(beans));
    }
   
    Object value = Jndi.lookup(name);
   
    if (value instanceof DataSource)
View Full Code Here

    raName = Character.toLowerCase(raName.charAt(0)) + raName.substring(1);

    Instance<ResourceAdapter> instance
      = _raInstance.select(Names.create(raName));

    Bean<?> bean = cdiManager.resolve(cdiManager.getBeans(ResourceAdapter.class,
                                                          Names.create(raName)));
   
    CreationalContext<?> env = cdiManager.createCreationalContext(bean);
    ResourceAdapter resourceAdapter
      = (ResourceAdapter) cdiManager.getReference(bean, ResourceAdapter.class, env);
View Full Code Here

    InjectManager beanManager = InjectManager.create();
   
    Set<Bean<?>> beans = beanManager.getBeans(DataSource.class, named);
   
    if (beans != null && beans.size() > 0) {
      return (DataSource) beanManager.getReference(beanManager.resolve(beans));
    }
   
    DataSource ds = (DataSource) Jndi.lookup(name);

    if (ds != null)
View Full Code Here

    }
    else {
      beans = beanManager.getBeans(type);
    }
   
    Bean<?> bean = beanManager.resolve(beans);
   
    if (bean == null) {
      throw new ConfigException(L.l("'{0}' with name='{1}' is an unknown JMS resource",
                                    type.getName(), name));
    }
View Full Code Here

        beanSet = webBeans.getBeans(destinationType);

      Object destComp = null;

      if (beanSet.size() > 0) {
        Bean destBean = webBeans.resolve(beanSet);
        CreationalContext env = webBeans.createCreationalContext(destBean);

        destComp
          = webBeans.getReference(destBean, destBean.getBeanClass(), env);
      }
View Full Code Here

      bean.setDestinationValue((Destination) destComp);

      beanSet = webBeans.getBeans(ConnectionFactory.class);

      Bean factoryBean = webBeans.resolve(beanSet);
      CreationalContext env = webBeans.createCreationalContext(factoryBean);

      Object comp = webBeans.getReference(factoryBean);

      if (comp == null)
View Full Code Here

      beans = beanManager.getBeans(_type, Names.create(text));
    else
      beans = beanManager.getBeans(_type);

    if (beans.iterator().hasNext()) {
      Bean bean = beanManager.resolve(beans);

      CreationalContext<?> env = beanManager.createCreationalContext(bean);

      value = beanManager.getReference(bean, _type, env);
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.