SessionFactory « cfg « JPA Q&A





1. Hibernate configuration - session factory scanning?    stackoverflow.com

We have this hibernate.cfg.xml file. Is there a way to tell Hibernate to just scan a directory instead of having to add an entry here for each class?

<hibernate-configuration>
   ...

5. Initial SessionFactory creation failed /hibernate.cfg.xml    forum.hibernate.org

Hi, I am trying to Run my first Hibernate Program using Eclipse and Hibernate 3.2...I have following directory structure: C:\hibernate-3.1\Projects\Source\com\Examples In Examples I have all my Files (.java, .class and .xml) My Hibernate.cfg.xml look like this com.microsoft.jdbc.sqlserver.SQLServerDriver jdbc:microsoft:sqlserver://cnp290:1433;databaseName=P3EWM_Indus;SelectMethod=Cursor IFW_User FW$user1 org.hibernate.dialect.SQLServerDialect false ...

6. can i have two session factory in a single hibernate.cfg.xml    forum.hibernate.org

Thanks for your reply.. But, is there any way I can use two databases in a single java program using hibernate? I need to write 2 configuration files whcih contains one session factory each and include these two corresponding files in program corresponding to the database i want to use? Is there any other method other than this. Also is it ...

7. Two SessionFactory in single hibernate.cfg.xml    forum.hibernate.org

. . . .