0 votes
in Hibernate by
List and describe the Hibernate framework’s essential interfaces.

1 Answer

0 votes
by

Hibernate’s important interfaces are:

SessionFactory (org.hibernate.SessionFactory). SessionFactory is an immutable thread-safe cache of compiled mappings meant for a single database. After users initialize SessionFactory once, they can cache and reuse it. SessionFactory is designed to return the session objects for database operations.

Session (org.hibernate.Session). A session is a single-threaded, short-lived object that represents a dialogue between the persistent store and the application. It is the interface that exists between the Hibernate framework and the Java application code, providing methods for CRUD operations. A session should be opened only when required, then closed as soon as the user is finished.

Transaction (org.hibernate.transaction). The transaction is a single-threaded, short-lived object that the application uses to specify atomic units of work.

...