Interesting facts on Hibernate

Transactions and Concurrency does not cause the SQL to be executed on the database -It merely converts a transient object to a persistent object. And in the process, binds values to the persistent object.

Hibernate (and many other ORM implementations) execute SQL statements asynchronously. An INSERT statement isn’t usually executed when the application calls, nor is an UPDATE immediately issued when the application
calls item.setPrice(). Instead, the SQL statements are usually issued at the end of a transaction.

Transient objects/Persistent Objects –

Newly instantiated instances of a a persistent class are considered transient by Hibernate. We can make a transient instance persistent by associating it with a session.

Semantic difference between session->persist() and session->save()

Long-running conversation means one that could span multiple pages on a website. The good part is that locks are not held for extended periods of time before a commit or a rollback.