1 Reply Latest reply on Mar 23, 2013 4:25 PM by wdfink

    simultaneous database updates thru webinterface

    gavrol

      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???

        • 1. Re: simultaneous database updates thru webinterface
          wdfink

          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.