Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate transaction demarcation

 
Gina vernon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone give an example of transaction demarcation in hibernate as seen from a business process point of view and not DB point of view? Or point me to a resource?
And can transaction demarcation be delegated to a server, like transaction management?
Thanks.
 
Javid Jamae
Author
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you asking about long-running transactions, such as going through a multi-page form?

Hibernate uses a session, which (in short) is like a first-level cache of objects that are to be persisted to the DB. The session can be used in different ways. You can connect and disconnect different DB transaction to the session, or you can detach objects from the session then merge them into another session. For the latter case, Hibernate supports versioning to enable optimistic concurrency control. A little bit of searching on the Hibernate wiki and docs will give you most of what you need.
 
Gina vernon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Javid,
I guess I am talking about a more specific scenario, say for instance, in a business-business org, there is a website where businesses can sign up login and manage their org related data, upload business related data.
How would I implement transaction demarcation? How do I decide where a transaction begins and where it ends?
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic