Examples of createCreationalContext()


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

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

      /*
      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

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

    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

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

      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

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

      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

Examples of javax.enterprise.inject.spi.BeanManager.createCreationalContext()

*/
public class DialogueBeanProvider {
    public static Dialogue dialogue(ServletContext servletContext) {
        BeanManager beanManager = new BeanManagerLocator().getBeanManager();
        Bean<?> bean = beanManager.resolve(beanManager.getBeans(Dialogue.class));
        return (Dialogue) beanManager.getReference(bean, Dialogue.class, beanManager.createCreationalContext(bean));
    }

    public static DialogueManager dialogueManager(ServletContext servletContext) {
        BeanManager beanManager = new BeanManagerLocator().getBeanManager();
        Bean<?> bean = beanManager.resolve(beanManager.getBeans(DialogueManager.class));
View Full Code Here

Examples of javax.enterprise.inject.spi.BeanManager.createCreationalContext()

    }

    public static DialogueManager dialogueManager(ServletContext servletContext) {
        BeanManager beanManager = new BeanManagerLocator().getBeanManager();
        Bean<?> bean = beanManager.resolve(beanManager.getBeans(DialogueManager.class));
        return (DialogueManager) beanManager.getReference(bean, DialogueManager.class, beanManager.createCreationalContext(bean));
    }
}
View Full Code Here

Examples of javax.enterprise.inject.spi.BeanManager.createCreationalContext()

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        BeanManager bm = getBeanManager();
        Bean<UserBean> bean = (Bean<UserBean>) bm.getBeans(UserBean.class).iterator().next();
        CreationalContext<UserBean> ctx = bm.createCreationalContext(bean);
        UserBean userBean = (UserBean) bm.getReference(bean, UserBean.class, ctx); // this could be inlined, but intentionally
                                                                                   // left this way

        for (Album a : userBean.getUser().getAlbums()) {
            if (a.getName().equals(value)) {
View Full Code Here

Examples of javax.enterprise.inject.spi.BeanManager.createCreationalContext()

    @Override
    public Object getAsObject(FacesContext context, UIComponent component, String value) {
        BeanManager bm = getBeanManager();
        Bean<UserBean> bean = (Bean<UserBean>) bm.getBeans(UserBean.class).iterator().next();
        CreationalContext<UserBean> ctx = bm.createCreationalContext(bean);
        UserBean userBean = (UserBean) bm.getReference(bean, UserBean.class, ctx); // this could be inlined, but intentionally left this way


        for(Shelf s : userBean.getUser().getShelves()) {
            if (s.getName().equals(value)) {
View Full Code Here

Examples of javax.enterprise.inject.spi.BeanManager.createCreationalContext()

      BeanManager manager = getBeanManager();
      Set<Bean<?>> beans = manager.getBeans(type);
      for (Bean<?> bean : beans) {
         if (bean != null)
         {
            CreationalContext<T> context = (CreationalContext<T>) manager.createCreationalContext(bean);

            if (context != null)
            {
               result.add((T) manager.getReference(bean, type, context));
               if (log.isDebugEnabled())
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.