1.

Explain The Role Of Session Interface In Hibernate.

Answer»

• In hibernate, the Session interface wraps a JDBC CONNECTION, holds a mandatory (first-level) cache of persistent objects, used when NAVIGATING the object graph or LOOKING up objects by IDENTIFIER and is a factory for Transaction.
• Session session = sessionFactory.openSession();
• The Session interface is the primary interface used by Hibernate applications.
• It is a single-threaded, short-lived object representing a conversation between the application and the persistent store.
• It allows you to create QUERY objects to retrieve persistent objects.

• In hibernate, the Session interface wraps a JDBC connection, holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier and is a factory for Transaction.
• Session session = sessionFactory.openSession();
• The Session interface is the primary interface used by Hibernate applications.
• It is a single-threaded, short-lived object representing a conversation between the application and the persistent store.
• It allows you to create query objects to retrieve persistent objects.



Discussion

No Comment Found