• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Few questions related to Hibernate.properties file

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anybody, have any idea about this....???
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic