This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Is there a way in which we can create a SessionFactory in hibernate using both Annotated Classes and HBM files.
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.