The moose likes Object Relational Mapping and the fly likes Few questions related to Hibernate.properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Few questions related to Hibernate.properties file" Watch "Few questions related to Hibernate.properties file" New topic
Author

Few questions related to Hibernate.properties file

Aditya Kanitkar
Ranch Hand

Joined: Aug 08, 2009
Posts: 72
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

Joined: Aug 08, 2009
Posts: 72
Has anybody, have any idea about this....???
Victor Ramen
Ranch Hand

Joined: Jul 14, 2008
Posts: 56
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
 
 
subject: Few questions related to Hibernate.properties file
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture