1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Name of classes provide implementations of Hibernate interfaces?

Discussion in 'Java' started by abhishekshahi, Jun 5, 2007.

?

Rate clarity and technical documentation of this Post?

Poll closed Jun 12, 2007.
  1. Excellent

    0 vote(s)
    0.0%
  2. Better

    1 vote(s)
    50.0%
  3. Good

    1 vote(s)
    50.0%
  4. Poor

    0 vote(s)
    0.0%
  1. abhishekshahi

    abhishekshahi New Member

    Joined:
    Jun 5, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software Professional
    Location:
    New Delhi,India
    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/creational/factory/factory.html
    Refer: (For control flow) Code attached
     

    Attached Files:

  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83

Share This Page