Package javax.enterprise.inject.spi

Examples of javax.enterprise.inject.spi.InjectionTarget.postConstruct()


      target.inject(protocol, env);

      if (_init != null)
        _init.configure(protocol);

      target.postConstruct(protocol);

      setProtocol(protocol);
    }
    else
      throw new ConfigException(L.l("protocol requires either a class"));
View Full Code Here


        CreationalContext<?> env = new OwnerCreationalContext(null);

        inject.inject(page, env);
       
        inject.postConstruct(page);
      } catch (InjectionException e) {
        throw ConfigException.createConfig(e);
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
View Full Code Here

            @Override
            public ManagedReference getReference() {
                final CreationalContext context = beanManager.createCreationalContext(null);
                final Object instance = injectionTarget.produce(context);
                injectionTarget.inject(instance, context);
                injectionTarget.postConstruct(instance);
                return new WeldManagedReference(injectionTarget, context, instance);
            }
        };
    }
View Full Code Here

    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);
    }

    public InjectedValue<BeanManager> getBeanManager() {
        return beanManager;
View Full Code Here

                                    implementor = producer.produce(creationalContext);
                                    if (producer instanceof InjectionTarget) {
                                        final InjectionTarget injectionTarget = (InjectionTarget) producer;
                                        injectionTarget.inject(implementor, creationalContext);
                                        injector = injectCxfResources(implementor); // we need it before postconstruct
                                        injectionTarget.postConstruct(implementor);
                                    }
                                    if (aob.getScope().equals(Dependent.class)) {
                                        creationalContext.addDependent(aob, instance);
                                    }
                                }
View Full Code Here

        managedObject = it.produce(cc);

        it.inject(managedObject, cc);

        if( invokePostConstruct ) {
            it.postConstruct(managedObject);
        }

        return new JCDIInjectionContextImpl(it, cc, managedObject);

    }
View Full Code Here

        managedObject = it.produce(cc);

        it.inject(managedObject, cc);

        if( invokePostConstruct ) {
            it.postConstruct(managedObject);
        }

        return new JCDIInjectionContextImpl(it, cc, managedObject);

    }
View Full Code Here

    @Override
    public void postConstruct(Object instance, Object creationMetaData) throws InjectionProviderException
    {
        AnnotatedType annoType = beanManager.createAnnotatedType(instance.getClass());
        InjectionTarget target = beanManager.createInjectionTarget(annoType);
        target.postConstruct(instance);
    }

    @Override
    public void preDestroy(Object instance, Object creationMetaData) throws InjectionProviderException
    {
View Full Code Here

        managedObject = it.produce(cc);

        it.inject(managedObject, cc);

        if( invokePostConstruct ) {
            it.postConstruct(managedObject);
        }

        return new JCDIInjectionContextImpl(it, cc, managedObject);

    }
View Full Code Here

        managedObject = it.produce(cc);

        it.inject(managedObject, cc);

        if( invokePostConstruct ) {
            it.postConstruct(managedObject);
        }

        return new JCDIInjectionContextImpl(it, cc, managedObject);

    }
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.