• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Few questions related to Hibernate.properties file

 
Aditya Kanitkar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to configure my hibernate settings with the help of Hibernate.properties file.
I've already written the contents in the file as well as the HBM file is also ready.



Contents from Hibernate.properties



My questions are...
1) Do i have to write hibernate.cfg.xml??
2) If yes, what should be written in it??
3) How can i map the .properties file , So that connection can be made...??

Please Help...

Thanks...

Aditya Kanitkar
 
Aditya Kanitkar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anybody, have any idea about this....???
 
Victor Ramen
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
1) Do i have to write hibernate.cfg.xml?? - This is basically the same as hibernate.properties in xml format. If both files are present in classpath, xml will take precedence. If you want to take advantage of xml syntax, you can use this one.
2) If yes, what should be written in it?? Basically the same stuff as in hibernate.properties
3) How can i map the .properties file , So that connection can be made...?? When you create a SessionFactory and open a session, a connection will be made using the parameters provided in .properties files.

Hope this helps,
Roy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic