/** * Gets the underlying target and calls the post-construct method * * @param invocationContext The invocation context * @throws Exception */ @PostConstruct public void postConstruct(InvocationContext invocationContext) throws Exception { String ejbName = getEjbName(); EjbDescriptor<Object> descriptor = beanManager.getEjbDescriptor(ejbName); InjectionTarget<Object> injectionTarget = beanManager.createInjectionTarget(descriptor); Bean<Object> bean = beanManager.getBean(descriptor); creationalContext = beanManager.createCreationalContext(bean); injectionTarget.inject(invocationContext.getTarget(), creationalContext); invocationContext.getContextData().put(CREATIONAL_CONTEXT, creationalContext); invocationContext.getContextData().put(EJB_DESCRIPTOR, descriptor); invocationContext.proceed(); }
/** * Gets the underlying target and calls the post-construct method * * @param invocationContext The invocation context * @throws Exception */ @PostConstruct public void postConstruct(InvocationContext invocationContext) throws Exception { String ejbName = getEjbName(); EjbDescriptor<Object> descriptor = beanManager.getEjbDescriptor(ejbName); injectionTarget = beanManager.createInjectionTarget(descriptor); Bean<Object> bean = beanManager.getBean(descriptor); creationalContext = beanManager.createCreationalContext(bean); injectionTarget.inject(invocationContext.getTarget(), creationalContext); invocationContext.getContextData().put(CREATIONAL_CONTEXT, creationalContext); invocationContext.getContextData().put(EJB_DESCRIPTOR, descriptor); invocationContext.proceed(); }