Weld
  1. Weld
  2. WELD-1410

Do not fail on duplicate interceptors

    Details

    • Type: Bug Bug
    • Status: Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.CR2
    • Fix Version/s: 2.0.0.CR4
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      According to the Interceptors spec lead this test is legal. Make sure Weld does not fail on duplicate interceptors and performs multiple invocations on the same interceptor instance.

      @Stateless
      @Remote({AroundInvokeIF.class})
      //This bean must use cmt, since it uses setRollbackOnly
      @ExcludeDefaultInterceptors
      @Interceptors({*Interceptor1.class*, Interceptor1.class})
      public class AroundInvokeBean extends AroundInvokeBase implements 
      AroundInvokeIF {
          @Resource(name="ejbContext")
          private SessionContext ejbContext;
       
          public AroundInvokeBean() {
              super();
          }
       
          //============ abstract methods from super ==========================
          protected javax.ejb.EJBContext getEJBContext() {
              return this.ejbContext;
          }
       
          //============= override business methods from super ================
          @Override
          @ExcludeClassInterceptors
          @Interceptors({InterceptorNoat1.class, 
      MethodLevelOnlyNoopInterceptor.class})
          public ArrayList<String> 
      methodLevelInterceptorMixedTest(ArrayList<String> alist)
          throws CalculatorException {
              return super.methodLevelInterceptorMixedTest(alist);
          }
       
          @Override
          @Interceptors({*Interceptor1*.class, 
      MethodLevelOnlyNoopInterceptor.class})
          public ArrayList<String> 
      methodLevelClassLevelInterceptorMixedTest(ArrayList<String> alist)
          throws CalculatorException {
              return super.methodLevelClassLevelInterceptorMixedTest(alist);
          }
       
          @Override
          @ExcludeDefaultInterceptors
          @Interceptors({InterceptorNoat1.class, InterceptorNoat1.class, 
      MethodLevelOnlyNoopInterceptor.class})
          public ArrayList<String> repeatedInterceptors(ArrayList<String> 
      alist)
          throws CalculatorException {
              return super.repeatedInterceptors(alist);
          }
       
          @Override
          @ExcludeDefaultInterceptors
          @Interceptors({*Interceptor1.class*, InterceptorNoat1.class})
          public ArrayList<String> 
      interceptorOrderingOverride(ArrayList<String> alist)
          throws CalculatorException {
              return super.interceptorOrderingOverride(alist);
          }
      }
      

        Gliffy Diagrams

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Jozef Hartinger
              Reporter:
              Jozef Hartinger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development