aspose file tools
The moose likes Object Relational Mapping and the fly likes Is 'Configuration' an Interface or Class in hibernate? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Is Watch "Is New topic
Author

Is 'Configuration' an Interface or Class in hibernate?

Kamal Saini
Greenhorn

Joined: May 25, 2012
Posts: 2
I have read in 'Hibernate in Action' book that 'Configuration' is an interface. But then below that I saw lines of code like :

Configuration cfg = new Configuration();
SessionFactory sessionFactory =
cfg.configure().buildSessionFactory();

Can someone clear my confusion:
If Configuration is an interface then how we can instantiate it like above code?
Or there are two things in Hibernate one is Configuration class and one is Configuration Interface?
Manuel Petermann
Ranch Hand

Joined: Jul 19, 2011
Posts: 175

javadocs
Its a Class not an Interface.
Maybe it was an Interface in the past. Hibernate isnt very api compatible between versions.


Please correct my English.
Kamal Saini
Greenhorn

Joined: May 25, 2012
Posts: 2
Thanks, Manuel, For the clarification.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is 'Configuration' an Interface or Class in hibernate?
 
Similar Threads
tangled up with session management 101
Problem with Hibernate Cache
Configuration and SessionFactory
problem with hibernate and struts
how to connect to multiple databases dynamically using Hibernate