Examples of CreationalContext


Examples of javax.enterprise.context.spi.CreationalContext

    @SuppressWarnings("unchecked")
    protected T getInstance(CreationalContext<T> creationalContext) {

        final List<Class> classes = beanContext.getBusinessLocalInterfaces();
        CurrentCreationalContext currentCreationalContext = beanContext.get(CurrentCreationalContext.class);
        CreationalContext existing = currentCreationalContext.get();
        currentCreationalContext.set(creationalContext);
        try {
            if (classes.size() == 0 && beanContext.isLocalbean()) {
                BeanContext.BusinessLocalBeanHome home = beanContext.getBusinessLocalBeanHome();
                return (T) home.create();
View Full Code Here

Examples of javax.enterprise.context.spi.CreationalContext

    @Override
    public ManagedReference createInstance(final Object instance) {
        final BeanManager beanManager = this.beanManager.getValue();
        final InjectionTarget injectionTarget = getInjectionTarget(instance.getClass());
        final CreationalContext context = beanManager.createCreationalContext(null);
        injectionTarget.inject(instance, context);
        injectionTarget.postConstruct(instance);
        return new WeldManagedReference(injectionTarget, context, instance);
    }
View Full Code Here

Examples of javax.enterprise.context.spi.CreationalContext

                }

                // IoCDestroyable

                public void destroy(Object o) {
                    final CreationalContext cc = beanManager.createCreationalContext(b);
                    ((Bean)b).destroy(o, cc);
                }
            };
        }
        else {
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

    }
  }

  @Override
  public boolean addDestructionCallback(final Object beanInstance, final DestructionCallback<?> destructionCallback) {
    final CreationalContext creationalContext = creationalContextMap.get(beanInstance);
    if (creationalContext == null) {
      return false;
    }

    creationalContext.addDestructionCallback(beanInstance, destructionCallback);
    return true;
  }
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

      }

      final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
      injectionContext = bootstrapper.bootstrapContainer();

      final CreationalContext rootContext = injectionContext.getRootContext();

      if (rootContext instanceof AsyncCreationalContext) {
        ((AsyncCreationalContext) rootContext).finish(new Runnable() {
          @Override
          public void run() {
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

  private final IOCBeanManager manager;
  private final CreationalContext rootContext;

  public BootstrapperInjectionContext() {
    manager = IOC.getBeanManager();
    rootContext = new CreationalContext(true, manager, ApplicationScoped.class.getName());
  }
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

  private IOCBeanManager manager;
  private CreationalContext rootContext;

  public BootstrapperInjectionContext() {
    manager = IOC.getBeanManager();
    rootContext = new CreationalContext(manager);
  }
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

  private IOCBeanManager manager;
  private CreationalContext rootContext;

  public BootstrapperInjectionContext() {
    manager = IOC.getBeanManager();
    rootContext = new CreationalContext(true, manager, "javax.enterprise.context.ApplicationScoped");
  }
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

    }
  }

  @Override
  public boolean addDestructionCallback(final Object beanInstance, final DestructionCallback<?> destructionCallback) {
    final CreationalContext creationalContext = creationalContextMap.get(beanInstance);
    if (creationalContext == null) {
      return false;
    }

    creationalContext.addDestructionCallback(beanInstance, destructionCallback);
    return true;
  }
View Full Code Here

Examples of org.jboss.errai.ioc.client.container.CreationalContext

      }

      final Bootstrapper bootstrapper = GWT.create(Bootstrapper.class);
      injectionContext = bootstrapper.bootstrapContainer();

      final CreationalContext rootContext = injectionContext.getRootContext();

      if (rootContext instanceof AsyncCreationalContext) {
        ((AsyncCreationalContext) rootContext).finish(new Runnable() {
          @Override
          public void run() {
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.