• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

locking of database record

 
k doshi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a requirement whereby , when one person is working on a record, i.e when it displayed on his screen others should not be able to view it.
will this work if i use EJB transaction as serializable.
also if this works then, in case someone doesn't close that record, is there any time out in weblogic for the transaction
thanks for the reply
kiran
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you want a single server architecture or a multi server architecture for this.
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think from the database level there is no way one can stop viewing data even if the isolation level is serializable.
So we need to design a solution at the application level and not at the database level.
 
k doshi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is a single server architecture.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can set the transaction isolation level to Serializable by adding the following to your weblogic-ejb-jar.xml:
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think that setting the isolation will give us the required feature. The feature asked is to know that someone else is viewing the record and not to show it to any other till the viewing is closed.
Making the isolation level serializable will lock the record for a write but not for a read
 
k doshi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok sorry there is a clarification that while one is working on the record others should not be able to update it, so i think it may work
thanks
kiran
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic