While local interceptors enabled in the beans.xml descriptor work as expected, global interceptors enabled with the @Priority annotation (introduced in CDI 1.2) do not work.
For example, if a CDI extension provides a PAX CDI capability and defines a global interceptor, that interceptor should be enabled in the bundle that requires the capability.
Antonin Stefanutti created PAXCDI-214
While local interceptors enabled in the
beans.xml
descriptor work as expected, global interceptors enabled with the@Priority
annotation (introduced in CDI 1.2) do not work.For example, if a CDI extension provides a PAX CDI capability and defines a global interceptor, that interceptor should be enabled in the bundle that requires the capability.
Such an example can be found in Metrics CDI that is tested in conjunction with Camel CDI in the following test case: https://github.com/astefanutti/camel-cdi/blob/46b85ff7830f57c3ad9ea8d8a1dd6ae157841bf1/envs/osgi/src/test/java/org/apache/camel/cdi/osgi/MetricsPaxExamTest.java.
That test fails if the code in the tested sample https://github.com/astefanutti/camel-cdi/blob/c653850ac7a8610721610e8fe37cc5934277ff8d/samples/metrics/src/main/java/org/apache/camel/cdi/sample/metrics/UnreliableService.java#L33 is replaced with a global interceptor.
Affects: 1.0.0.RC1 Votes: 0, Watches: 1