Main Selling point of Hibernate

Persistent instances lose their association with the persistence manager(Session object) when you close() the Session. We refer to these objects as “detached”, indicating that their state is no longer guaranteed to be synchronized with
database state; they’re no longer under the management of Hibernate. However, they still contain persistent data (that may possibly soon be stale). It’s possible (and common) for the application to retain a reference to a detached object outside of a transaction (and persistence manager).

Hibernate lets you reuse these instances in a new transaction by reassociating them with a new persistence manager. (After reassociation, they’re considered persistent.) This feature has a deep impact on how multitiered applications may be designed. The ability to return objects from one transaction to the presentation layer and later reuse them in a new transaction The persistence lifecycle is one of Hibernate’s main selling points. Its a popular implementation technique for long-running applications (or conversations)

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: