Package org.apache.webbeans.intercept

Examples of org.apache.webbeans.intercept.InvocationContextImpl


        if(getWebBeansType().equals(WebBeansType.MANAGED) ||
                getWebBeansType().equals(WebBeansType.DECORATOR))               
        {
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.PRE_DESTROY))
            {               
                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null,
                        InterceptorUtil.getInterceptorMethods(getInterceptorStack(),
                                                              InterceptorType.PRE_DESTROY),
                                                              InterceptorType.PRE_DESTROY);
                impl.setCreationalContext(creationalContext);
                try
                {
                    impl.proceed();
                }
                catch (Exception e)
                {
                    logger.error(OWBLogConst.ERROR_0008, e, "@PreDestroy.");
                    throw new WebBeansException(e);
View Full Code Here


        if(getWebBeansType().equals(WebBeansType.MANAGED))
        {
            // Call Post Construct
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.POST_CONSTRUCT))
            {
                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null,
                        InterceptorUtil.getInterceptorMethods(getInterceptorStack(),
                                                              InterceptorType.POST_CONSTRUCT),
                                                              InterceptorType.POST_CONSTRUCT);
                impl.setCreationalContext(ownerCreationalContext);
                try
                {
                    impl.proceed();
                }

                catch (Exception e)
                {
                    log.error(OWBLogConst.ERROR_0008, e, "@PostConstruct.");
View Full Code Here

        if(getWebBeansType().equals(WebBeansType.MANAGED) ||
                getWebBeansType().equals(WebBeansType.DECORATOR))               
        {
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.PRE_DESTROY))
            {               
                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null,
                        InterceptorUtil.getInterceptorMethods(getInterceptorStack(),
                                                              InterceptorType.PRE_DESTROY),
                                                              InterceptorType.PRE_DESTROY);
                impl.setCreationalContext(creationalContext);
                try
                {
                    impl.proceed();
                }
                catch (Exception e)
                {
                    log.error(OWBLogConst.ERROR_0008, e, "@PreDestroy.");
                    throw new WebBeansException(e);
View Full Code Here

       
        if(injectionTarget != null)
        {
            if (WebBeansUtil.isContainsInterceptorMethod(injectionTarget.getInterceptorStack(), InterceptorType.POST_CONSTRUCT))
            {               
                InvocationContextImpl impl = new InvocationContextImpl(null, context.getTarget(), null, null,
                        InterceptorUtil.getInterceptorMethods(injectionTarget.getInterceptorStack(), InterceptorType.POST_CONSTRUCT), InterceptorType.POST_CONSTRUCT);
                impl.setCreationalContext(threadLocalCreationalContext.get());
                try
                {
                    //run OWB interceptors
                    impl.proceed();
                   
                    //run EJB interceptors
                    context.proceed();
                }
                catch (Exception e)
View Full Code Here

       
        if(injectionTarget != null)
        {
            if (WebBeansUtil.isContainsInterceptorMethod(injectionTarget.getInterceptorStack(), InterceptorType.PRE_DESTROY))
            {               
                InvocationContextImpl impl = new InvocationContextImpl(null, context.getTarget(), null, null,
                        InterceptorUtil.getInterceptorMethods(injectionTarget.getInterceptorStack(), InterceptorType.PRE_DESTROY), InterceptorType.PRE_DESTROY);
                impl.setCreationalContext(threadLocalCreationalContext.get());
                try
                {
                    //Call OWB interceptord
                    impl.proceed();
                   
                    //Call EJB interceptors
                    context.proceed();
                }
                catch (Exception e)
View Full Code Here

       
        if (interceptorStack.size() > 0 && WebBeansUtil.isContainsInterceptorMethod(interceptorStack, interceptorType))
        {
            localcc = manager.createCreationalContext(null);
           
            InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null,
                    InterceptorUtil.getInterceptorMethods(interceptorStack, interceptorType), interceptorType);
            impl.setCreationalContext(localcc);
           
            try
            {
                impl.proceed();
            }
            catch (Exception e)
            {
                logger.error(OWBLogConst.ERROR_0008, e, interceptorType);               
            }   
View Full Code Here

            // Call Post Construct
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.POST_CONSTRUCT))
            {
                InterceptorHandler.injectInterceptorFields(getInterceptorStack(), (CreationalContextImpl<T>)ownerCreationalContext);
               
                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null, WebBeansUtil.getInterceptorMethods(getInterceptorStack(), InterceptorType.POST_CONSTRUCT), InterceptorType.POST_CONSTRUCT);
                try
                {
                    impl.proceed();
                }

                catch (Exception e)
                {
                    logger.error(OWBLogConst.ERROR_0008, new Object[]{"@PostConstruct."}, e);
View Full Code Here

        {
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.PRE_DESTROY))
            {
                InterceptorHandler.injectInterceptorFields(getInterceptorStack(),(CreationalContextImpl<T>) creationalContext);
               
                InvocationContextImpl impl = new InvocationContextImpl(null, instance, null, null, WebBeansUtil.getInterceptorMethods(getInterceptorStack(), InterceptorType.PRE_DESTROY), InterceptorType.PRE_DESTROY);
                try
                {
                    impl.proceed();
                }
                catch (Exception e)
                {
                    getLogger().error(OWBLogConst.ERROR_0008, new Object[]{"@PreDestroy."}, e);
                    throw new WebBeansException(e);
View Full Code Here

        if(getWebBeansType().equals(WebBeansType.MANAGED))
        {
            // Call Post Construct
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptionType.POST_CONSTRUCT))
            {
                InvocationContextImpl impl = new InvocationContextImpl(getWebBeansContext(), null, instance, null, null,
                        getWebBeansContext().getInterceptorUtil().getInterceptorMethods(getInterceptorStack(),
                                                                                        InterceptionType.POST_CONSTRUCT),
                                                                                        InterceptionType.POST_CONSTRUCT);
                impl.setCreationalContext(ownerCreationalContext);
                try
                {
                    impl.proceed();
                }

                catch (Exception e)
                {
                    getLogger().log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0008, "@PostConstruct."), e);
View Full Code Here

        if(getWebBeansType().equals(WebBeansType.MANAGED) ||
                getWebBeansType().equals(WebBeansType.DECORATOR))               
        {
            if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptionType.PRE_DESTROY))
            {               
                InvocationContextImpl impl = new InvocationContextImpl(getWebBeansContext(), null, instance, null, null,
                        getWebBeansContext().getInterceptorUtil().getInterceptorMethods(getInterceptorStack(),
                                                                                        InterceptionType.PRE_DESTROY),
                                                                                        InterceptionType.PRE_DESTROY);
                impl.setCreationalContext(creationalContext);
                try
                {
                    impl.proceed();
                }
                catch (Exception e)
                {
                    getLogger().log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0008, "@PreDestroy."), e);
                    throw new WebBeansException(e);
View Full Code Here

TOP

Related Classes of org.apache.webbeans.intercept.InvocationContextImpl

Copyright © 2018 www.massapicom. 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.