[CDI-355] Disconnect between other specs and CDI with regard to when Interceptors and decorators are run Created: 18/Mar/13  Updated: 07/Oct/16  Resolved: 19/Mar/13

Status: Closed
Project: CDI Specification Issues
Component/s: None
Affects Version/s: 1.1.PFD
Fix Version/s: 1.1.FD

Type: Bug Priority: Major
Reporter: Joe Bergmark Assignee: Pete Muir
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


Other specifications have text that appears to assume interceptors will run for non-contextual instances.

The PDF (and CDI 1.0 for that matter) list the following rules to be considered a business method:

Container invocations and interception [biz_method]
When the application invokes:
• a method of a bean via a contextual reference to the bean, as defined in Section 6.5.3, or
• a business method of a session bean via an EJB remote or local reference,

and then say:

If, and only if, an invocation is a business method invocation:
• it passes through method interceptors and decorators, and
• in the case of a session bean, it is subject to EJB services such as declarative transaction management, concurrency, security
and asynchronicity, as defined by the EJB specification.

Comment by Pete Muir [ 19/Mar/13 ]

Thanks, fixed

Comment by Joseph Snyder [ 19/Mar/13 ]

Pete, does this mean that interceptors will run for non-contextual instances?

Comment by Pete Muir [ 20/Mar/13 ]

JJ, the addition to the spec was:

"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()),"

Comment by Antoine Sabot-Durand [ 07/Oct/16 ]

Closing all resolved issues in CDI 1.x

Generated at Fri Nov 16 03:56:54 EST 2018 using Jira 7.12.1#712002-sha1:609a50578ba6bc73dbf8b05dddd7c04a04b6807c.