
Define the session factory interface in hibernate?

Hi Samar,
The SessionFactory creates new hibernate sessions by referencing immutable and thread safe objects. Application using hibernate are usually allowed and desgined to implement single instance of the class using this interface. SessionFactory is thread safe, so that many threads can access it concurrently and requests the sessions
Session session = HibernateUtil.getSessionFactory().getCurrentSession();