Package org.apache.webbeans.intercept

Examples of org.apache.webbeans.intercept.InvocationContextImpl


        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

    {
        try
        {
            if ((this.contextual != null) && WebBeansUtil.isContainsInterceptorMethod(this.contextual.getInterceptorStack(), interceptionType))
            {
                InvocationContextImpl impl = new InvocationContextImpl(webBeansContext, this.contextual, context.getTarget(), null, null,
                        webBeansContext.getInterceptorUtil().getInterceptorMethods(this.contextual.getInterceptorStack(), interceptionType), interceptionType);
                impl.setCreationalContext(this.cc);
                impl.setEJBInvocationContext(context); // If the final 299 interceptor calls ic.proceed, the InvocationContext calls the ejbContext.proceed()
                impl.setCcKey(this.ccKey);
                impl.proceed();
            }
            else
            {
                context.proceed(); // no 299 interceptors   
            }
View Full Code Here

        if ((this.contextual != null) && WebBeansUtil.isContainsInterceptorMethod(this.contextual.getInterceptorStack(), InterceptionType.AROUND_TIMEOUT))
        {          
            try
            {
                    InvocationContextImpl impl = new InvocationContextImpl(webBeansContext, null, context.getTarget(), null, null,
                            webBeansContext.getInterceptorUtil().getInterceptorMethods(this.contextual.getInterceptorStack(),
                                    InterceptionType.AROUND_TIMEOUT),
                                    InterceptionType.AROUND_TIMEOUT);
                    impl.setCreationalContext(this.cc);
                    impl.setEJBInvocationContext(context);
                    impl.setCcKey((Object)this.ccKey);
                   
                    rv = impl.proceed(); //run OWB interceptors and underlying EJBcontext.proceed()
            }
            catch (Exception e)
            {
                logger.log(Level.SEVERE, WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0008, "@AroundTimeout."), e);
                throw new RuntimeException(e);
View Full Code Here

            DefinitionUtil.defineWebBeanDecoratorStack(this, instance);
        }

        if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.POST_CONSTRUCT))
        {
            InvocationContextImpl impl = new InvocationContextImpl(instance, null, null, WebBeansUtil.getInterceptorMethods(getInterceptorStack(), InterceptorType.POST_CONSTRUCT), InterceptorType.POST_CONSTRUCT);
            try
            {
                impl.proceed();

            }
            catch (Exception e)
            {
                throw new WebBeansException(e);
View Full Code Here

    @Override
    protected void destroyInstance(T instance)
    {
        if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.PRE_DESTROY))
        {
            InvocationContextImpl impl = new InvocationContextImpl(instance, null, null, WebBeansUtil.getInterceptorMethods(getInterceptorStack(), InterceptorType.PRE_DESTROY), InterceptorType.PRE_DESTROY);
            try
            {
                impl.proceed();

            }
            catch (Exception e)
            {
                throw new WebBeansException(e);
View Full Code Here

        }       

        //Call Post Construct
        if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.POST_CONSTRUCT))
        {
            InvocationContextImpl impl = new InvocationContextImpl(null,instance, null, null, WebBeansUtil.getInterceptorMethods(getInterceptorStack(), InterceptorType.POST_CONSTRUCT), InterceptorType.POST_CONSTRUCT);
           
            try
            {
                impl.proceed();

            }
           
            catch (Exception e)
            {
View Full Code Here

    @SuppressWarnings("unchecked")
    protected void destroyComponentInstance(T instance)
    {
        if (WebBeansUtil.isContainsInterceptorMethod(getInterceptorStack(), InterceptorType.PRE_DESTROY))
        {
            InvocationContextImpl impl = new InvocationContextImpl(null,instance, null, null, WebBeansUtil.getInterceptorMethods(getInterceptorStack(), InterceptorType.PRE_DESTROY), InterceptorType.PRE_DESTROY);
            try
            {
                impl.proceed();

            }
            catch (Exception e)
            {
                throw new WebBeansException(e);
View Full Code Here

    {
        try
        {
            if ((this.contextual != null) && WebBeansUtil.isContainsInterceptorMethod(this.contextual.getInterceptorStack(), interceptorType))
            {
                InvocationContextImpl impl = new InvocationContextImpl(this.contextual, context.getTarget(), null, null,
                        InterceptorUtil.getInterceptorMethods(this.contextual.getInterceptorStack(), interceptorType), interceptorType);
                impl.setCreationalContext(this.cc);
                impl.setEJBInvocationContext(context); // If the final 299 interceptor calls ic.proceed, the InvocationContext calls the ejbContext.proceed()
                impl.setCcKey(this.ccKey);
                impl.proceed();
            }
            else
            {
                context.proceed(); // no 299 interceptors   
            }
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)
                {
                    logger.error(OWBLogConst.ERROR_0008, e, "@PostConstruct.");
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.