Databases

Kodejava

Tag Archives: hibernate.cfg.xml

When creating an application the use Hibernate to manage our application persistence object we’ll need a SessionFactory. This factory creates or open a session to talk to a database.

To create a SessionFactory we can define the configuration in hibernate.properties, hibernate.cfg.xml or create it programatically. In this example we’ll use the hibernate.cfg.xml configuration file, which is mostly use when creating Hibernate application.