Subscribe: TheServerSide: TheServerSide: Message List - EJB pattern to lock a database row while some user is editing it
http://www.theserverside.com/rss/thread.tss?thread_id=44579
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
database row  ejb pattern  entity  lock database  lock  locking logic  logic entity  pattern lock  row user  row  timestamp  user 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: TheServerSide: TheServerSide: Message List - EJB pattern to lock a database row while some user is editing it

Support Forums: Message List - EJB pattern to lock a database row while some user is editing it



Most recent forum messages



Published: Fri, 30 Sep 2016 16:55:47 -0400

 



Re: Extract locking logic from entity

Thu, 19 Jul 2007 04:58:57 -0400

I think the idea is not bad. Actually I work on a SAP Netweaver project which involves usage of Entity Beans....



Extract locking logic from entity

Tue, 03 Apr 2007 15:58:54 -0400

Since I assume (from your description) that you require pessimistic locking of an entity, you might consider removing locking logic from the entity and create a Lock entity that will be a collaborator of the entity you wish to lock. A lock entity would...



Re: EJB pattern to lock a database row while some user is editin

Tue, 13 Mar 2007 06:14:35 -0400

There are somethings that just cant be done (in a clean and elegant fashion). How about using a stateful session EJB. It supports transactions spanning methods. (this is a really bad solution, but then, you've got an equally bad....)



Re:Niklas

Mon, 12 Mar 2007 04:48:09 -0400

On one side, I think it's a good idea to do two short transactions instead a long transaction (as long as 'thinking time' as you said), to lock and unlock the row....



Re: Niklas

Mon, 12 Mar 2007 02:40:51 -0400

Hi Santiago,...



Re: Niklas

Sat, 10 Mar 2007 14:23:41 -0500

I thinks TIMESTAMP not solve my problem. A second user could write the same row as the first one, I agree with you....



Re: or use a timestamp

Fri, 09 Mar 2007 16:47:32 -0500

A timestamp versioning mechanism would not prevent the second user updating the row, it would only allow the first user to find out that the data has gone stale while having it in his gui....



or use a timestamp

Thu, 08 Mar 2007 21:07:40 -0500

Many people would just use a timestamp on the row to detect a data collision, then display an error or whatever to the user.