I'm migrating to Hibernate 3 and am trying to understand the benefits of utilizing Java 5 Annotations versus XDoclet for Hibernate mappings.
Since annotations can be included and read an runtime, it could be inferred that Hibernate XML Mappings (HBM.XML files) are no longer necessary.
But through XDoclet, I was able to generate the hbm.xml files for each POJO and the mappings file listing all the hbm.xml filesin the application was also generated. This mappings file was then read by our application at runtime and all the mapped classes were added in the configuration while building the SessionFactory.
Now by using Annotations, is there any way by which we can generate a mappings file that contains a list of all the Annotated classes so that they can be added to configuration at runtime.
Thank you for any and all help.
|