Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking with Entity Beans

Abhinav Srivastava
Ranch Hand
Posts: 354
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider this sequence of events
Tx 1 : Loads Entiry A
TX 1: Update Entity A
Tx 2: Executes SQL Query to Read a row which is affected by Tx 1
Tx 1: commits

Should TX2 be locked out until TX1 is committed (it seems so) ? I am working in Websphere/DB2 environment with access intent policy wsPessimisticUpdateNoCollision. I am trying to find a way out of the locking situation. Would the behaviour be any different if instead of using direct SQL, we use EJB lookups?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic