• Post Reply Bookmark Topic Watch Topic
  • New Topic

EntityBean Locking -Doubt

 
akilan irudaya raja
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In a Transaction Context, finder method is called. and It returns 100 entity bean references , and few of the Entity beans are being modified , while this operation happens. all the 100 entity beans will be locked for other transaction.

is this true ?

Thanks
Akilan
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe yes, maybe no, depends on whether you are doing select-for-update locking or not.
 
akilan irudaya raja
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default,
container would write a query with select-for-update ?

so default behaviour would lock?

Thanks
Akilan
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Container defaults vary, so you need to check the docs for your particular container. As a broad rule of thumb there should be a really obvious feature in the vendor-specific deployment descriptor info to turn select-for-update on and off. If you can find the docs or (when it is an XML file) the DTD for that file, it should be clear what the default is.

Note that select-for-update isn't bad, all of this stuff is a matter of weighing the issues and coming up with the best trade-off between performance and transactional safety.
 
akilan irudaya raja
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur answer.

I verified with weblogic,It has use-select-for-update xml tag to
control the behaviour. By default it is false.

Thanks
Akilan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!