|
Hi,
We would like clarification regarding what the expected behaviour according to the CDI 1.2 spec based on this use case.
We have a project which has 2 Decorator classes ( Class A and B) which has the Priority enabled in the class via the @Priority annotatation whereby class A has a higher priority over class B based on the Priority annotation.
In the same project, we have these 2 decorator classes defined in the file beans.xml whereby Class B is specified before Class A in the decorator element as below.
When we execute the project we notice that Class A is enabled before Class B despite the definition of beans.xml overriding the order specified by the @Priority annotation. We would like to clarify the expected behaviour here based on the CDI 1.2 spec. Are decorators enabled using @Priority called before decorators enabled using beans.xml? Does the order of Decorators in beans.xml take precedence over those defined by the Priority annotation?
beans.xml snippet:
<interceptors> <class>Class B</class> <class>Class A</class> </interceptors>
<decorators> <class>Class B</class> <class>Class A</class> </decorators>
Thanks, David
|