I'm seeing some weird behavior regarding ProcessAnnotatedType events in Wildfly 15 and 16 Beta1.
I'm deploying an CDI extension contained in a JAR placed in WEB-INF/lib that observers PAT events like this:
A CDI extension in HibernateValidator also observers PAT events:
Accoding to my understanding of the spec my extension should fire AFTER the Hibernate Validator extension, because of the use of @Priority for ordering.
Unfortunately this doesn't seem to work correctly. For some reason the observers are notified in random order. So it changes randomly between deployments. Sometimes my extension gets the AnnotatedType which was already modified by the Hibernate Validator extension executed before and sometimes I'm getting an unmodified AnnotatedType and HibernateValidator executed AFTER my extension.
I'm not 100% sure about that, but AFAIK this worked correctly in previous Wildfly versions (11 or 12?).
Any idea what is causing this?