Hibernate : How a real hibernate project is configured
Joined: Sep 15, 2012
I have recently joined JavaRanch in order to seek help from the tech geeks here. I have been given responsibility build an application using Hibernate and Spring.
I have only bookish knowledge of hibernate so I wanted to know few things :
(1) How in a real project the datasource is configured. We have several different environments each using a different database. So the datasource configuration needs to be flexible.
(2) How to configure a SessionFactory in a real project. I don't want any Java code to be written like to create a new Configuration object and calling the buildSessionFactory() method to
get the SessionFactory. How does in a real project a Session Factory is configured ?
(3) What are other configurations need to be set , i mean to say how to handle transaction strategy, caching and other stuff.
Can somebody please enlighten on these things ? It would be great if someone can share the WAR of a real project so that I can see other things as well.