Package javax.interceptor

Examples of javax.interceptor.InvocationContext.proceed()


            InvocationContext invocation = context.getInvocation();
            DelegateQueryHandler delegate = selectDelegate(context.getMethod());
            if (delegate != null) {
                return invoke(delegate, context);
            }
            return invocation.proceed();
        } catch (Exception e) {
            throw new QueryInvocationException(e, context);
        }
    }
   
View Full Code Here


    public Object execute(QueryInvocationContext context) throws Exception {
        InvocationContext invocation = context.getInvocation();
        if (EntityDaoHandler.contains(invocation.getMethod())) {
            return callEntityHandler(invocation, context.getEntityClass(), context.getEntityManager());
        }
        return invocation.proceed();
    }
   
    private Object callEntityHandler(InvocationContext ctx, Class<?> entityClass, EntityManager entityManager)
            throws Exception {
        return EntityDaoHandler.create(entityManager, entityClass).invoke(ctx.getMethod(), ctx.getParameters());
View Full Code Here

        InvocationContext ic = new LifecycleInterceptorInvocationContext<T>(internalInstance, InterceptionType.POST_CONSTRUCT, postConstructInterceptors,
                                                                            interceptorInstances, postConstructMethods);
        try
        {
            ic.proceed();
        }
        catch (Exception e)
        {
            throw ExceptionUtil.throwAsRuntimeException(e);
        }
View Full Code Here

        InvocationContext ic = new LifecycleInterceptorInvocationContext<T>(internalInstance, InterceptionType.PRE_DESTROY, preDestroyInterceptors,
                                                                            interceptorInstances, preDestroyMethods);
        try
        {
            ic.proceed();
        }
        catch (Exception e)
        {
            ExceptionUtil.throwAsRuntimeException(e);
        }
View Full Code Here

                                       Object serviceObject,
                                       Method m,
                                       Object[] paramArray) throws Exception {
        InvocationContext invContext = exchange.get(InvocationContext.class);
        invContext.setParameters(paramArray);
        Object res = invContext.proceed();
       
        EJBMessageContext ctx = (EJBMessageContext)invContext.getContextData();
       
        Map<String, Object> handlerProperties = (Map<String, Object>)exchange.get(HANDLER_PROPERTIES);
        addHandlerProperties(ctx, handlerProperties);
View Full Code Here

                } else {
                    return super.proceed();
                }
            }
        };
        return childContext.proceed();
    }
}
View Full Code Here

    public Object invoke(javax.xml.rpc.handler.MessageContext messageContext, Object... parameters) throws Exception {
        try {
            InvocationContext invocationContext = new JaxRpcInvocationContext(operation, interceptors, beanInstance, targetMethod, messageContext, parameters);
            ThreadContext.getThreadContext().set(InvocationContext.class, invocationContext);
            Object value = invocationContext.proceed();
            return value;
        } finally {
            ThreadContext.getThreadContext().remove(InvocationContext.class);
        }
    }
View Full Code Here

        try {
            InvocationContext invocationContext = createInvocationContext(parameters);
            if (ThreadContext.getThreadContext() != null) {
                ThreadContext.getThreadContext().set(InvocationContext.class, invocationContext);
            }
            Object value = invocationContext.proceed();
            return value;
        } finally {
            if (ThreadContext.getThreadContext() != null) {
                ThreadContext.getThreadContext().remove(InvocationContext.class);
            }
View Full Code Here

    public Object invoke(javax.xml.ws.handler.MessageContext messageContext, Object... parameters) throws Exception {
        try {
            InvocationContext invocationContext = new JaxWsInvocationContext(operation, interceptors, beanInstance, targetMethod, messageContext, parameters);
            ThreadContext.getThreadContext().set(InvocationContext.class, invocationContext);
            Object value = invocationContext.proceed();
            return value;
        } finally {
            ThreadContext.getThreadContext().remove(InvocationContext.class);
        }
    }
View Full Code Here

/*     */     }
/*     */     try
/*     */     {
/* 123 */       InvocationContext ic = LifecycleInvocationContextImpl.getLifecycleInvocationContext(PreDestroy.class, ctx, this.preDestroys, this.beanPreDestroys);
/*     */
/* 128 */       ic.proceed();
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 132 */       throw new RuntimeException(e);
/*     */     }
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.