Discussion:
[jboss-user] [Beginner's Corner] - simultaneous database updates thru webinterface
olena gavriliouk
2013-03-23 11:39:10 UTC
Permalink
olena gavriliouk [https://community.jboss.org/people/gavrol] created the discussion

"simultaneous database updates thru webinterface"

To view the discussion, visit: https://community.jboss.org/message/804432#804432

--------------------------------------------------------------
Hi.
I am a newbie. built a simple web service using jboss seam.

clients use an editable dynamic table (a portion of a database table that's displayed in a browser based on client's selection of criteria)  to  modify the database entries. when a client is done, a save button is pressed to send the info into the databases. multiple clients can have the same view opened and attempt to populate and save, hence overwriting each other's edits.

putting a save button next to each cell is not an acceptable solution.

what are my options???
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/804432#804432]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Wolf-Dieter Fink
2013-03-23 20:26:01 UTC
Permalink
Wolf-Dieter Fink [https://community.jboss.org/people/wdfink] created the discussion

"Re: simultaneous database updates thru webinterface"

To view the discussion, visit: https://community.jboss.org/message/804447#804447

--------------------------------------------------------------
Hello Olena,
welcome to the forum.

If I understand your requremntes correct, this is a common problem.
You might set a lock first (pessimistic) and block other clients.
Or you use a 'version counter' and check the counter before you change (in the same transaction).

The second approach is better as it will not block other and if the browser or connetion fail you must not cleanup the lock.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/804447#804447]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Loading...