As I pointed out in the reply to Hardy, I think there is a confusion here. I am not asking that we simply be able to hand Jandex an XML file and expect it to be able to figure out how to apply overrides. Thats not going to work.
Again, what would be needed is some kind of SPI where we could tell Jandex how to apply an override as it is "indexing" (heck, Jandex won't even know its coming from an XML file). I have not dug into Jandex internals, so this is more just pseudo code, but more what I mean is along the lines of being able to tie into the AnnotationInstance building process within Jandex. In the simpliest form, think of externalizing the process of building of AnnotationInstance behind a factory that Hibernate could somehow hook in to. And this would totally work with <metadata-complete/>... The "downside" to such an approach would be the need to know and parse all XML files providing overrides prior to the Jandex indexing. That is easy enough to control in the cases where we are building the Jandex index ourselves. But not sure how feasible that is when AS is building it and would then in turn be handing it to us later. On 07/17/2012 05:00 AM, Strong Liu wrote: > I don't see there is a general way to integrate xml override into > jandex, I think it is a very domain specific issue. and the "override" > has lots of different requirements, for example "metadata-complete" > > org.hibernate.metamodel.internal.source.annotations.xml.mocker.IndexBuilder#mappingMetadataComplete > > > > > -- > Strong Liu > Sent with Sparrow <http://www.sparrowmailapp.com/?sig> > > On Tuesday, July 17, 2012 at 3:06 AM, Steve Ebersole wrote: > >> Strong, I forgot to mention that Jason completely agrees that changes to >> Jandex are needed. I agreed to prototype some of the things he and I >> discussed specifically in this code base and hand them back to him for >> integration back into the next rev of Jandex. >> >> One such point of discussion was a common interface for "Index". >> Unfortunately the name Index is already taken as in the main Jandex >> class. So we came up with some other names. For this work I went ahead >> with the name 'IndexResult' for that common contract (interface). >> Anyway, no matter the name, eventually both Index and that new >> CompositeIndex would both implement this new common contract. >> >> The other thing we discussed was integrating XML overrides into the >> indexing process since quite a few places where Jandex gets used would >> need this. And since you worked on that in the metamodel codebase, was >> hoping to get your feedback as to whether you thought it would be >> possible to integrate XML overrides into this process up front. And if >> so, how you thought it might be best to approach that. >> >> >> On 07/16/2012 12:25 PM, Steve Ebersole wrote: >>> Not sure what happened. Maybe I just forgot to upload? Anyway, it is >>> there now. >>> >>> On Mon 16 Jul 2012 09:39:04 AM CDT, Steve Ebersole wrote: >>>> Hmmm.. let me check... >>>> >>>> On Mon 16 Jul 2012 08:45:48 AM CDT, Hardy Ferentschik wrote: >>>>> Hi, >>>>> >>>>> >>>>>> It also contains some major refactorings: >>>>>> 1) removal of Ejb3Configuration in preference of the new 2-phase >>>>>> bootstrap approach of Bootstrap/EntityManagerFactoryBuilder. >>>>> >>>>> sounds good >>>>> >>>>>> 2) I renamed o.h.ejb to o.h.jpa. >>>>> >>>>> +1 jpa is much more concise >>>>> >>>>>> Let me know if you see any problems… >>>>> >>>>> it seems you latest code depends on a Draft-6b which is not deployed >>>>> to the repository. I can only see Daft-6. >>>>> >>>>> Could not resolve all dependencies for configuration >>>>> ':hibernate-core:compile'. >>>>>> Could not find group:org.hibernate.javax.persistence, >>>>>> module:hibernate-jpa-2.1-api, version:1.0.0.Draft-6b. >>>>> Required by: >>>>> org.hibernate:hibernate-core:4.1.5-SNAPSHOT >>>>> >>>>> --Hardy >>>> >>>> -- >>>> st...@hibernate.org <mailto:st...@hibernate.org> >>>> http://hibernate.org >>> >>> -- >>> st...@hibernate.org <mailto:st...@hibernate.org> >>> http://hibernate.org >> >> -- >> st...@hibernate.org <mailto:st...@hibernate.org> >> http://hibernate.org >> >> >> _______________________________________________ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org <mailto:hibernate-dev@lists.jboss.org> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > -- st...@hibernate.org http://hibernate.org _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev