Package com.caucho.config.inject

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


      if (_authenticator != null)
        login.setAuthenticator(_authenticator);

      InjectManager manager = InjectManager.create();
      InjectionTarget inject = manager.createInjectionTarget(login.getClass());
      inject.inject(login, manager.createCreationalContext(null));

      login.init();

      return login;
    } catch (Exception e) {
View Full Code Here


      /*
      Protocol protocol
        = (Protocol) webBeans.createTransientObjectNoInit(_protocolClass);
      */
      InjectionTarget target = webBeans.createInjectionTarget(_protocolClass);
      CreationalContext env = webBeans.createCreationalContext(null);

      AbstractProtocol protocol = (AbstractProtocol) target.produce(env);
      target.inject(protocol, env);

      if (_init != null)
View Full Code Here

    if (_authenticator == null) {
      Bean<Authenticator> bean = findAuthenticator(cdiManager);
     
      if (bean != null) {
        CreationalContext<Authenticator> env
          = cdiManager.createCreationalContext(bean);
       
        _authenticator = (Authenticator)
           cdiManager.getReference(bean, Authenticator.class, env);
      }
    }
View Full Code Here

      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)
        throw new ConfigException(L.l("ejb-message-bean requires a configured JMS ConnectionFactory"));
View Full Code Here

      = _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);

    if (resourceAdapter == null) {
      throw new ConfigException(L.l("'{0}' does not have a configured resource-adapter for '{1}'.",
View Full Code Here

      return _object;

    InjectManager cdiManager = InjectManager.create();
    _target = cdiManager.createInjectionTarget(_listenerClass);

    CreationalContext<T> env = cdiManager.createCreationalContext(null);

    _object = _target.produce(env);
    _target.inject(_object, env);

    if (_init != null) {
View Full Code Here

        _bean = beanManager.createInjectionTarget(filterClass);

        filter = config.getFilter();

        CreationalContext env = beanManager.createCreationalContext(null);
        if (filter == null)
          filter = (Filter) _bean.produce(env);

        _bean.inject(filter, env);
View Full Code Here

        _bean = beanManager.createInjectionTarget(filterClass);

        filter = config.getFilter();

        CreationalContext env = beanManager.createCreationalContext(null);
        if (filter == null)
          filter = (Filter) _bean.produce(env);

        _bean.inject(filter, env);
View Full Code Here

  public AbstractLogin getLoginObject()
  {
    InjectManager manager = InjectManager.create();

    Bean bean = getComponentFactory();
    CreationalContext env = manager.createCreationalContext(bean);

    return (AbstractLogin) manager.getReference(bean, AbstractLogin.class, 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.