kochcp wrote:
I like being able to manually load the hbm.xml files into my configuration as I require their usage in my installation. I like to keep the config stuff separate from the java beans. Personal preference I guess.
Ditto. Furthermore, you need to ask yourself whether not the things you want to put in Java code are the responsibility of a developer or a deployer. If it is for a developer then it is ok to put them in Java code but if it is something that can be of a deployer's interest then you need to put it somewhere outside Java code. For example, once I was in this situation where we had a third party software that used hibernate with annotations and according to contract we did not own the source so we were not able to tweak caching strategies according to our needs and it was a lot better for us if we had access to XML files.
In any events, I don't think we can have any reasonable discussion on whether not we should favour annotations over xml files, and with the kind of technologies we have at this point (IDEs, frameworks that integrate with each other, ...), this stays as a personal choice and the kind of people you have in your project. I have seen people that feel a lot more confident with annotations. I personally feel better with XMLs but I am a little bit old school.
Farzad-