Hi,
We are having an update web page where the data from Customers table is
displayed to the user. We are using valueobjects to transfer the data to the
web tier. There are 2 clients
Client 1 Client 2
--------- ---------
views the data ***
*** views the same data
*** updates the data
updates the data ***
Both are allowed the updates. when both the users viewed the data the sql was
select address2
,modifieddate
,...
from customers
where customerid = 41
The output was
address2 Timestamp
---------- ------------
B 02-dec-2004 17:33:35
When client2 updated the record the query was
UPDATE CUSTOMERS SET address2='C', modifieddate='Thu Dec 09 17:10:58 IST 2004'
WHERE customerid=41 AND modifieddate='Thu Dec 02 17:33:35 IST 2004'
In the where clause it uses the timestamp fetched above(While updating we are
doing a finder and then calling the setter)
When client1 updated the record the query was
UPDATE CUSTOMERS SET address2='D', modifieddate='Thu Dec 09 17:11:41 IST 2004'
WHERE customerid=41 AND modifieddate='Thu Dec 09 17:10:58 IST 2004'
In the where clause it uses the timestamp of the client 2 updates as we are
invoking a finder again. This is the reason for lost updates.
Is there are way by which we can give the timestamp which we the client has
rather than getting the latest and comparing it which always will be correct?
Regards,
V.Janardhanan
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3858028#3858028
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3858028
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user