Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-44

Clarify that interceptors must be implemented using subclassing, and clarify the behaviour of self-invocation

    • Icon: Clarification Clarification
    • Resolution: Done
    • Icon: Major Major
    • 1.1.PFD
    • 1.0
    • Interceptors
    • None

      When implementing interception using proxying the behaour of self invocation is quite well defined, if a method is invoked on the proxy it is intercepted, if it is invoked on the actual bean (usually through self-invocation) it is not.

      When implementing interception though sub classing this is much less well definied, and the only way to track if an invocation is intercepted or not is through a thread local flag. At the moment in weld this is reset when a call is made on a client proxy, so if we have an intercepted bean A and a SessionScoped bean B and A invokes B when invokes A the second call to A is intercepted. If however B is pseudo scoped, then the second invocation is not intercepted. The correct behaviour here should be specified by the specification.

            [CDI-44] Clarify that interceptors must be implemented using subclassing, and clarify the behaviour of self-invocation

            Closing all resolved issues in CDI 1.x

            Antoine Sabot-Durand (Inactive) added a comment - Closing all resolved issues in CDI 1.x

            Merged

            Pete Muir (Inactive) added a comment - Merged

            Pete Muir (Inactive) added a comment - Please review https://github.com/jboss/cdi/pull/175

            Reopening as the addition to Section 3.15 (proxyable requirements for interceptors and decorators) is overlapping with sections 8.3 and 9.3

            Jozef Hartinger added a comment - Reopening as the addition to Section 3.15 (proxyable requirements for interceptors and decorators) is overlapping with sections 8.3 and 9.3

            New pull request at https://github.com/jboss/cdi/pull/126 to review

            Pete Muir (Inactive) added a comment - New pull request at https://github.com/jboss/cdi/pull/126 to review

            Pete Muir (Inactive) added a comment - Please review https://github.com/jboss/cdi/pull/117

            1. Use the same list of behavioural criteria as CDI-74 (which was created to cover interception)

            2. Describe correct behaviour on self-invocation - and what is the effect of using proxies

            Marius Bogoevici (Inactive) added a comment - - edited 1. Use the same list of behavioural criteria as CDI-74 (which was created to cover interception) 2. Describe correct behaviour on self-invocation - and what is the effect of using proxies

            I don't think we should actually put down how they are impl'd but describe required effects.

            Pete Muir (Inactive) added a comment - I don't think we should actually put down how they are impl'd but describe required effects.

              pmuiratbleepbleep Pete Muir (Inactive)
              sdouglas1@redhat.com Stuart Douglas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: