Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB and Record Locking  RSS feed

 
Simon Ling
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A newbie to J2EE...
I was asked to demonstrate record locking in EJB. In Session 1, I will update a record in Oracle through entity EJB (container managed). In another session, Session 2, I will attempt to update the same record through Oracle Sqlplus, before Session 1 commits the update. The goal is to show that
the record is locked by Session 1 and the update by Session 2 will have no impact.
How I do this? Is it even possible to update a record (Session 2) before a container-managed EJB commits changes? TIA
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi szeho,
We have a naming policy here at JavaRanch where all publicly displayed names take the form, "Firstname surname". Could you please change yours to bring it into line?
Thanks in advance and we hope that you enjoy your stay at the ranch!
Cheers
Simon
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!