Interesting facts on Hibernate

Transactions and Concurrency

http://docs.jboss.org/hibernate/core/3.3/reference/en/html/

Session.save() 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 session.save(), 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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: