View Poll Results: Rate clarity and technical documentation of this Post?
Excellent 0 0%
Better 1 50.00%
Good 1 50.00%
Poor 0 0%
Voters: 2. You may not vote on this poll

Name of classes provide implementations of Hibernate interfaces?

abhishekshahi's Avatar author of Name of classes provide implementations of Hibernate interfaces?
This is an article on Name of classes provide implementations of Hibernate interfaces? in Java.
Rated 5.00 By 1 users
People generally have doubt that when we use Hibernate we simply use configuration to create SessionFactory(). Using that we create session for JDBC connection. But all these SessionFactory and Session class are interfaces. But there is no class available with this name which implements methods of this class.

Hibernate interfaces Session,SessionFactory,Transaction etc. are implementation of factory Pattern.i.e. We simply request for an object and its implementation class returns required object.

a Hierarchy could be like this,

net.sf.hibernate.Configuration class --> requests for --> net.sf.hibernate.SessionFactory interface --> which inturn builds a SessionFactory using --> net.sf.hibernate.impl.SessionFactoryImpl class


Refer: (For factory Pattern) http://gsraj.tripod.com/design/creat...y/factory.html
Refer: (For control flow) Code attached
Attached Files
File Type: txt example.txt (1,007 Bytes, 13 views)
Go4Expert Founder
5Jun2007,18:02   #2
shabbir's Avatar
These days I have been doing some factory patterns and I think you can also refer to

http://msdn2.microsoft.com/en-us/library/ms954600.aspx