Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-1425

Interceptors not being called on UnmanagedInstance

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Resolved
    • None
    • 4.0.0
    • Core, TCK
    • None

    Description

      OWB does not interceptors on UnmanagedInstance even though the specification is quite clear in that area.

       

      https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0.html#biz_method_full

      When the application invokes:

      • a method of a bean via a non-contextual reference to the bean, if the instance was created by the container (e.g. using InjectionTarget.produce() or UnmanagedInstance.produce(), or
      • a method of a bean via a non-contextual reference to the bean, if the instance was enhanced with the InterceptionFactory interface as defined in The InterceptionFactory interface,
        the invocation is treated as a business method invocation.

      The spec also says

      A method invocation passes through method interceptors and decorators if, and only if, it is a business method invocation.
      Otherwise, the invocation is treated as a normal Java method call and is not intercepted by the container.

       

      We can't pass the following TCK test org.jboss.cdi.tck.tests.full.extensions.beanManager.unmanaged.UnmanagedInstanceTest

       

      Attachments

        Activity

          People

            struberg Mark Struberg
            jlmonteiro Jean-Louis Monteiro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: