Examples of InterceptorBindings


Examples of org.jboss.weld.ejb.spi.InterceptorBindings

   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);
         }

      }
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

      EjbServices ejbServices = beanManager.getServices().get(EjbServices.class);
      if (ejbServices instanceof ForwardingEjbServices)
      {
         ejbServices = ((ForwardingEjbServices)ejbServices).delegate();
      }
      InterceptorBindings interceptorBindings = null;
      if (ejbServices instanceof JBossEjbServices)
      {
          interceptorBindings = ((JBossEjbServices)ejbServices).getInterceptorBindings(ejbName);
      }
      return interceptorBindings;
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

   }

   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();
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

   }

   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();
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

            InterceptorInstances instances = (InterceptorInstances) context.getContextData().get(InterceptorInstances.class);

            if (instances == null) {
                creationalContext = beanManager.createCreationalContext(bean);
                interceptorInstances = new HashMap<String, SerializableContextualInstance<Interceptor<Object>, Object>>();
                InterceptorBindings interceptorBindings = getInterceptorBindings(this.ejbName);
                if (interceptorBindings != null) {
                    for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) {
                        addInterceptorInstance((Interceptor<Object>) interceptor, beanManager, interceptorInstances);
                    }
                }
                instances = new InterceptorInstances(creationalContext, interceptorInstances);
                context.getContextData().put(InterceptorInstances.class, instances);
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

    }


    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();
        }
    }
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

        }
    }

    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();
        }
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

        BeanManagerImpl beanManager = (BeanManagerImpl) this.beanManager;
        EjbServices ejbServices = beanManager.getServices().get(EjbServices.class);
        if (ejbServices instanceof ForwardingEjbServices) {
            ejbServices = ((ForwardingEjbServices) ejbServices).delegate();
        }
        InterceptorBindings interceptorBindings = null;
        if (ejbServices instanceof WeldEjbServices) {
            interceptorBindings = ((WeldEjbServices) ejbServices).getBindings(ejbName);
        }
        return interceptorBindings;
    }
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

            InterceptorInstances instances = (InterceptorInstances) context.getContextData().get(InterceptorInstances.class);

            if (instances == null) {
                creationalContext = beanManager.createCreationalContext(bean);
                interceptorInstances = new HashMap<String, SerializableContextualInstance<Interceptor<Object>, Object>>();
                InterceptorBindings interceptorBindings = getInterceptorBindings(this.ejbName);
                if (interceptorBindings != null) {
                    for (Interceptor<?> interceptor : interceptorBindings.getAllInterceptors()) {
                        addInterceptorInstance((Interceptor<Object>) interceptor, beanManager, interceptorInstances);
                    }
                }
                instances = new InterceptorInstances(creationalContext, interceptorInstances);
                context.getContextData().put(InterceptorInstances.class, instances);
View Full Code Here

Examples of org.jboss.weld.ejb.spi.InterceptorBindings

    }


    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();
        }
    }
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.