Multiple choice technology architecture

This Class represents a single-threaded unit of work in Hibernate?

  1. SessionFactory

  2. Session

  3. Transaction

  4. None of the Above.

Reveal answer Fill a bubble to check yourself
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.