I want to use Hibernate's ability to provide a JDBC connection. I'm looking through
Chapter 2 SessionFactory Configuration section
2.6 XML Configuration File in the online reference.
http://www.hibernate.org/hib_docs/refer ... ation.html
I have all jar files for the Hibernate 1.2.5 distributable in my WSAD lib folder and they've been imported to the project. The examples do not seem to work. Take the two examples provided:
Code:
import cirrus.hibernate.cfg.Configuration;
SessionFactory sf = new Configuration().configure().buildSessionFactory();
SessionFactory sf =
Configuration.configure(
"catdb.cfg.xml"
).buildSessionFactory();
Configuration appears to be a helper class with no visible constructor, and configure() does not take a string argument.
What am I doing wrong? How do I setup my codebase so that Hibernate-aware objects can do their own configuration management?