 |
 |
|
 |
 |
Hibernate configuration
To allow persistence you need to configure Hibernate using the provided config files (in ./config folder).
For example, to use the library with Postgresql hibernate config:
Configuration cfg = new Configuration(); cfg.configure( new File( "./config/hibernate.postgresql.cfg.xml") );
SessionFactory sessions = cfg.buildSessionFactory(); Session session = sessions.openSession();
For HSQLD in stand-alone mode just change the config file:
cfg.configure( new File( "./config/hibernate.hsqldb.cfg.xml") );
If you can setup your own config file for you database. Just copy one of the provided file, and edit the property section with appropriate database connection and dialect.
|
 |
|
 |
 |
|
 |
|
|