Perhaps there's a reason I'm missing for doing this way, but why looking into the parent composite index only if there's no AnnotationInstance in the current index? At this point, given the JIRA that's being worked, shouldn't we process both in any case if the parent is a EAR? What if there's a web.xml referencing 2 endpoint classes, one in the war and the other in a jar living in ear's lib folder?