Sanjay:
This is an issue that the object/relational mapping layer in our open-source
component library helps deal with. Basically, all interaction with the DB is
done via "database objects", which have attributes for all columns in the
table. Even if another update changes the record before the user updates
again, the original values are still available. In the simplest case, the
"last user wins" - e.g. whoever updates the record last updates it with all
of the consistent values from his/her session, although of course
concurrency control can do more sophisticated checking to avoid the previous
user having their work overwritten. This tends to be more of a design issue
than anything else at that point.
You can get the framework/library at our site listed below.
Hope it's helpful to you
Mike
Javacorporate Ltd
http://www.javacorporate.com
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Radhakrishnan, Sanjay (c)
> Sent: Friday, January 21, 2000 10:39 AM
> To: [EMAIL PROTECTED]
> Subject: OFFTOPIC: Data Concurrency & Consistency
>
>
> Im wondering if there are any tools/libraries/frameworks which allows
> applications written in Java to easily maintain data
> concurrency/consistency
> .
>
> Let me give a case where i would need this tooll/library.
>
> User 1 selects records 1,2 & 3 from table A
> User 2 selects records 1,3 & 4 from table A
>
> User 2 updates record 1 with a different set of values.
>
> Now User 1 tries to update record 1 with his set of values. But user 1s
> update would fail because he won't be able to find the record he
> retrieved(i.e. record 1) as it would have been already changed by user 2.
>
> To avoid this the app would have include the original values that user 1
> retrieved from the database initially. If the app does this then
> there wont
> be a match in the database for this update statement and the app
> can flash a
> message to user 1 saying the record has already been updated/deleted by
> another user.
>
> Do any of you know of a tool/library/bean which can give the same type of
> functionality. Ideal case would be i would just have to declare
> to the bean
> to use Key and Modifiable columns or Just Key columns or Key and
> updateable
> columns in the where clause and it would generate the update/insert/delete
> statement accordingly.
>
> Appreciate your inputs
> Sanjay
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html