1.

State The Role Of Sessionfactory Interface Plays In Hibernate.

Answer»

• An application obtains Session instances from a SessionFactory which is typically single for the whole application created during its INITIALIZATION.
• The SessionFactory caches generate SQL statements and other mapping METADATA that Hibernate uses at runtime.
• It also holds cached data that has been read in one unit of work and MAY be reused in a future unit of work
SessionFactory sessionFactory = configuration.buildSessionFactory();

• An application obtains Session instances from a SessionFactory which is typically single for the whole application created during its initialization.
• The SessionFactory caches generate SQL statements and other mapping metadata that Hibernate uses at runtime.
• It also holds cached data that has been read in one unit of work and may be reused in a future unit of work
SessionFactory sessionFactory = configuration.buildSessionFactory();



Discussion

No Comment Found