Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global interceptors are not enabled with PAX CDI [PAXCDI-214] #259

Open
ops4j-issues opened this issue Feb 24, 2016 · 1 comment
Open

Global interceptors are not enabled with PAX CDI [PAXCDI-214] #259

ops4j-issues opened this issue Feb 24, 2016 · 1 comment
Labels

Comments

@ops4j-issues
Copy link

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

@ops4j-issues
Copy link
Author

Antonin Stefanutti commented

After further investigation, it happens that this is actually a side effect of PAXCDI-216 .

Having PAXCDI-216 fixed enables global interceptors to work as expected in PAX CDI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant