Examples of addBean()


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

        factory.type(AdminAuthenticator.class);
       
        factory.qualifier(DefaultLiteral.DEFAULT);
        factory.qualifier(new AdminLiteral());

        cdiManager.addBean(factory.singleton(_auth));
      }

      if (_transactionManager != null)
        _transactionManager.start();
    } catch (Exception e) {
View Full Code Here

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

    BeanBuilder<WebApp> factory = beanManager.createBeanFactory(WebApp.class);
    factory.type(WebApp.class);
    factory.type(ServletContext.class);
    // factory.stereotype(CauchoDeploymentLiteral.create());

    beanManager.addBean(factory.singleton(webApp));

    Config.setProperty("webApp", getVar());
    Config.setProperty("app", getVar());

    webApp.setRegexp(_regexpValues);
View Full Code Here

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

      BeanBuilder factory = beanManager.createBeanFactory(resourceObject.getClass());
     
      if (getName() != null) {
        Jndi.bindDeepShort(getName(), resourceObject);

        beanManager.addBean(factory.name(getName()).singleton(resourceObject));
      }
      else {
        beanManager.addBean(factory.singleton(resourceObject));
      }
    }
View Full Code Here

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

        Jndi.bindDeepShort(getName(), resourceObject);

        beanManager.addBean(factory.name(getName()).singleton(resourceObject));
      }
      else {
        beanManager.addBean(factory.singleton(resourceObject));
      }
    }
  }
}
View Full Code Here

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

   
    ResourceAdapterProducer<T> producer = new ResourceAdapterProducer(controller);
   
    Bean<T> bean = factory.injection(producer);

    beanManager.addBean(bean);
   
    ((InjectionBean) bean).introspectProduces();
  }

  @Override
View Full Code Here

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

     
      factory.qualifier(DefaultLiteral.DEFAULT);

      Bean bean = factory.singleton(connectionFactory);

      cdiManager.addBean(bean);
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
  }
View Full Code Here

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

    BeanBuilder factory = beanManager.createBeanFactory(_ra.getClass());
   
    if (_resourceAdapter.getName() != null) {
      Jndi.bindDeepShort(_resourceAdapter.getName(), _ra);

      beanManager.addBean(factory.name(_resourceAdapter.getName())
                          .singleton(_ra));
    }
    else {
      beanManager.addBean(factory.name(_name).singleton(_ra));
    }
View Full Code Here

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

      beanManager.addBean(factory.name(_resourceAdapter.getName())
                          .singleton(_ra));
    }
    else {
      beanManager.addBean(factory.name(_name).singleton(_ra));
    }

    // create a default outbound factory
    if (_outboundList.size() == 0 && _jndiName != null && _rar != null) {
      ObjectConfig factoryConfig = _rar.getConnectionDefinition(null);
View Full Code Here

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

        // server/30b4
        factory.qualifier(Names.create(getName()));
        factory.qualifier(CurrentLiteral.CURRENT);
      }
     
      manager.addBean(factory.singleton(connectionFactory));
    }
  }

  public class ConnectionListener {
    private String _name;
View Full Code Here

Examples of javax.enterprise.inject.spi.AfterBeanDiscovery.addBean()

    @Test
    public void testAfterBeanDiscovery() {
        final AfterBeanDiscovery event = extension.getAfterBeanDiscovery();
        new Invocation() {
            void execute() {
                event.addBean(new DummyBean());
            }
        }.run();
        new Invocation() {
            void execute() {
                event.addContext(new DummyContext());
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.