This Class represents a single-threaded unit of work in Hibernate?
-
SessionFactory
-
Session
-
Transaction
-
None of the Above.
B
Correct answer
Explanation
The Hibernate Session represents a single-threaded unit of work and is the primary interface for CRUD operations. Sessions are lightweight and not thread-safe - each thread should obtain its own session. SessionFactory is thread-safe and creates sessions, while Transaction represents a transaction within a session.