Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2349

Observer interceptors not called via stereotype method level annotations

    Details

      Description

      Given the following stereotype annotation:

      @Inherited
      @Stereotype
      @Transactional(Transactional.TxType.SUPPORTS)
      @Retention(RetentionPolicy.RUNTIME)
      @Target({ ElementType.TYPE, ElementType.METHOD })
      public @interface TxSupports {
      }
      

      For the following observer method, the transactional interceptor is not invoked:

      @TxSupports
      public void observe(@Observes(during = TransactionPhase.BEFORE_COMPLETION) MyEvent event) { }
      

      When using the same annotation on type level, the interceptor is invoked:

      @TxSupports
      public class MyObserverType {
         public void observe(@Observes(during = TransactionPhase.BEFORE_COMPLETION) MyEvent event) { }
      }
      

      When using the @Transactional annotation directly on method level, the interceptor is invoked:

      @Transactional(Transactional.TxType.SUPPORTS)
      public void observe(@Observes(during = TransactionPhase.BEFORE_COMPLETION) MyEvent event) { }
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mobe Moritz Becker
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: