myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Wessendorf <>
Subject Re: [Trinidad] Ensure Correctness of Data.
Date Tue, 25 Aug 2009 11:36:11 GMT
On Mon, Aug 24, 2009 at 6:07 PM, Leon Dorfling<> wrote:
> We are developing our first Java project using Trinidad.
> We are trying to resolve, a seemingly simple problem we have encountered,
> but due to our lack of experience have not found the optimal solution.
> Our problem is, 2 users are viewing the same data. User1 deletes a record
> from the database. The deleted record has not yet been deleted from user2’s
> page. Subsequentley user2 tries to update the record deleted by user1. User2
> clicks on the record (deleted by user1) and navigates to a page to update
> the record. The update page is rendered with data for the row after the
> deleted row in the table.
> How do I ensure that if user2 tries to update a deleted record, he is either
> warned that the records no longer exists or the data is refreshed before he
> invokes an update process.

you need to implement a smarter solution here by your self. EG using
unique IDs, so that one could not load a deleted object by a (wrong)

Another would be to implement something like optimistic locking, see here:
(no, there is no need to use ActiveRecord for that. Can be done with
anything you are
using in the back-end).

But basically your application (design) has to take care of this.


> Thanks.
> Leon Dorfling
> Pepkor IT
> email : leond@pepkoritcom
> tel : (021) 937 9225
> fax : (021) 937 9213
> cell : 083 6789 270
> Pep a division of Pepkor Retail Limited.The legal status of this
> communication is governed by the terms and conditions
> published at,
> which terms and conditions relate,inter alia, to confidentiality and
> limitation of liability and include the names of directors and the
> registration number of the company.

Matthias Wessendorf


View raw message