Is the Session threadsafe in Hibernate ?
-
TRUE
-
FALSE
-
No matter
-
None of the above
B
Correct answer
Explanation
Hibernate Session objects are NOT thread-safe. Each thread should have its own Session instance, or you need to implement proper synchronization. Sharing a Session across threads can lead to race conditions, data corruption, and unpredictable behavior. This is a fundamental design choice in Hibernate.