private Object doLifecycleInterception(final InterceptorContext context, InterceptorInstances interceptorInstances, final InterceptorBindings interceptorBindings) throws Exception { if (interceptorBindings == null) { return context.proceed(); } else { List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType); return delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors, interceptorInstances); } } }
private Object doMethodInterception(InvocationContext invocationContext, InterceptionType interceptionType, InterceptorInstances interceptorInstances, InterceptorBindings interceptorBindings) throws Exception { if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getMethodInterceptors(interceptionType, invocationContext.getMethod()); return delegateInterception(invocationContext, interceptionType, currentInterceptors, interceptorInstances); } else { return invocationContext.proceed(); } }
for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) { addInterceptorInstance((Interceptor<Object>) interceptor, beanManager, interceptorInstances, creationalContext);
for(Interceptor<?> next : interceptorBindings.getAllInterceptors()) { if ( logger.isLoggable( Level.FINE ) ) { logger.log(Level.FINE, interceptorBindings.getLifecycleInterceptors(InterceptionType.AROUND_CONSTRUCT), glassfishEjbDesc); glassfishEjbDesc.appendToInterceptorChain(aroundConstructChain); interceptorBindings.getLifecycleInterceptors(InterceptionType.POST_CONSTRUCT), glassfishEjbDesc); glassfishEjbDesc.appendToInterceptorChain(postConstructChain); interceptorBindings.getLifecycleInterceptors(InterceptionType.PRE_DESTROY), glassfishEjbDesc); glassfishEjbDesc.appendToInterceptorChain(preDestroyChain); interceptorBindings.getLifecycleInterceptors(InterceptionType.PRE_PASSIVATE), glassfishEjbDesc); glassfishEjbDesc.appendToInterceptorChain(prePassivateChain); interceptorBindings.getLifecycleInterceptors(InterceptionType.POST_ACTIVATE), glassfishEjbDesc); glassfishEjbDesc.appendToInterceptorChain(postActivateChain); List<EjbInterceptor> aroundInvokeChain = makeInterceptorChain(InterceptionType.AROUND_INVOKE, interceptorBindings.getMethodInterceptors(InterceptionType.AROUND_INVOKE, m), glassfishEjbDesc); glassfishEjbDesc.addMethodLevelChain(aroundInvokeChain, m, true);
private Object doMethodInterception(InvocationContext invocationContext, InterceptionType interceptionType, InterceptorInstances interceptorInstances, InterceptorBindings interceptorBindings) throws Exception { if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getMethodInterceptors(interceptionType, invocationContext.getMethod()); return delegateInterception(invocationContext, interceptionType, currentInterceptors, interceptorInstances); } else { return invocationContext.proceed(); } }
private void doLifecycleInterception(InvocationContext invocationContext, InterceptionType interceptionType) throws Exception { if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType); delegateInterception(invocationContext, interceptionType, currentInterceptors); } else { invocationContext.proceed(); } }
private void init(InvocationContext invocationContext) { // create contextual instances for inteDITrceptors interceptorInstances = new ConcurrentHashMap<String, SerializableContextualInstance<Interceptor<Object>, Object>>(); ejbName = ((EjbDescriptor<?>) invocationContext.getContextData().get(SessionBeanInterceptor.EJB_DESCRIPTOR)).getEjbName(); InterceptorBindings interceptorBindings = getInterceptorBindings(ejbName); if (interceptorBindings != null) { for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) { addInterceptorInstance((Interceptor<Object>)interceptor, invocationContext); } } }
private Object doMethodInterception(InvocationContext invocationContext, InterceptionType interceptionType) throws Exception { if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getMethodInterceptors(interceptionType, invocationContext.getMethod()); return delegateInterception(invocationContext, interceptionType, currentInterceptors); } else { return invocationContext.proceed(); } }
private void doLifecycleInterception(InvocationContext invocationContext, InterceptionType interceptionType) throws Exception { InterceptorBindings interceptorBindings = getInterceptorBindings(ejbName); if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType); delegateInterception(invocationContext, interceptionType, currentInterceptors); } else { invocationContext.proceed(); } }
private void init(InvocationContext invocationContext) { // create contextual instances for inteDITrceptors interceptorInstances = new ConcurrentHashMap<String, SerializableContextualInstance<Interceptor<Object>, Object>>(); EjbDescriptor<?> ejbDescriptor = (EjbDescriptor<?>) invocationContext.getContextData().get(SessionBeanInterceptor.EJB_DESCRIPTOR); EjbServices ejbServices = beanManager.getServices().get(EjbServices.class); if (ejbServices instanceof ForwardingEjbServices) { ejbServices = ((ForwardingEjbServices)ejbServices).delegate(); } if (ejbServices instanceof JBossEjbServices) { interceptorBindings = ((JBossEjbServices)ejbServices).getInterceptorBindings(ejbDescriptor); } if (interceptorBindings != null) { for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) { addInterceptorInstance((Interceptor<Object>)interceptor, invocationContext); } } }
private Object doMethodInterception(InvocationContext invocationContext, InterceptionType interceptionType) throws Exception { InterceptorBindings interceptorBindings = getInterceptorBindings(ejbName); if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getMethodInterceptors(interceptionType, invocationContext.getMethod()); return delegateInterception(invocationContext, interceptionType, currentInterceptors); } else { return invocationContext.proceed(); } }
private Object doLifecycleInterception(final InterceptorContext context, InterceptorInstances interceptorInstances, final InterceptorBindings interceptorBindings) throws Exception { if (interceptorBindings == null) { return context.proceed(); } else { List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType); return delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors, interceptorInstances); } } }
InterceptorBindings interceptorBindings = getInterceptorBindings(this.ejbName); if (interceptorBindings != null) { for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) { addInterceptorInstance((Interceptor<Object>) interceptor, beanManager, interceptorInstances);
private Object doMethodInterception(InvocationContext invocationContext, InterceptionType interceptionType) throws Exception { InterceptorBindings interceptorBindings = getInterceptorBindings(ejbName); if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getMethodInterceptors(interceptionType, invocationContext.getMethod()); return delegateInterception(invocationContext, interceptionType, currentInterceptors); } else { return invocationContext.proceed(); } }
private Object doLifecycleInterception(final InterceptorContext context) throws Exception { try { final InterceptorBindings interceptorBindings = getInterceptorBindings(ejbName); if (interceptorBindings != null) { List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType); delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors); } } finally { return context.proceed(); } }