I am afraid that the specification assumes a decorator to be enabled either using @Priority or using beans.xml. It does not consider the case when both methods of enablement are used at once. There is an open issue for this already: https://issues.jboss.org/browse/CDI-490 Can you elaborate why you need the decorator to have both @Priority and beans.xml enablement? It would be helpful for resolving the CDI issue as well as possibly changing Weld behavior in the meantime.
|