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

Interceptor not called for bean injected with Producer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 2.2.1.Final
    • None
    • Hide
      • Create a bean for View (in my case, I'm using a vaddin UI)
      • In that bean, declare a service bean with particular constructor and @Inject to instantiate it.
      • because of particular constructor, annotate that with @MyServiceBeanQualifier
      • Create Qualifier Annotation and Producer Class
      • Create classes for interceptor: in my case @Transactional
      • In view bean, make a call to @Transactional method on service bean
      • @Transactional Method is not intercepted
      • If I take off particular constructor and use just @Inject on service bean declaration, that means, not use custom producer, the interceptor is called correctly.
      • If I annotate a method on view layer (not on service bean) with @Transactional, that method is also intercepted correctly.
      Show
      Create a bean for View (in my case, I'm using a vaddin UI) In that bean, declare a service bean with particular constructor and @Inject to instantiate it. because of particular constructor, annotate that with @MyServiceBeanQualifier Create Qualifier Annotation and Producer Class Create classes for interceptor: in my case @Transactional In view bean, make a call to @Transactional method on service bean @Transactional Method is not intercepted If I take off particular constructor and use just @Inject on service bean declaration, that means, not use custom producer, the interceptor is called correctly. If I annotate a method on view layer (not on service bean) with @Transactional, that method is also intercepted correctly.

      A Method inside a service bean, annotated with some Interceptor is not intercepted ONLY when service bean is instantiated using particular producer.

            rhn-engineering-jharting Jozef Hartinger
            bruno_bert_jira Bruno bertoni de Paula (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: