Is there a way in which we can create a SessionFactory in hibernate using both Annotated Classes and HBM files.
Thanks
Rahul
1) Yes, if you are using just Hibernate, then you list the .hbm files and classes that are annotated in your hibernate.cfg.xml
2) If you are using JPA and Hibernate is your implementation, then you but it in your persistence.xml file, and I don't think they will be .hbm, so I assume #1 is what you have
3) If you are integrating it with Spring, then it would be in a <bean> tag for an implement of LocalSessionFactoryBean or JPA's Factory Bean as property values to those Spring FactoryBean classes.