Hi Raghavan,

Kollivakkam R. Raghavan wrote:

When we store data into a database using OJB, in order to solve the
concurrent change issue we're created a col called mod_num (integer)
which we are setting up to auto increment on each update to that row.
The idea is to not allow a change to happen if the mod_num in the db
does not match the value in the data object (i.e. someone else has
updated the record).

2 questions:
1. Is this the best way to do this?
2. If this is acceptable (I've seen other commercial software use this
mechanism), then what's the best way to setup OJB to help me without
everyone having to worry about this logic

this sounds like optimistic locking. Please have a look at

http://db.apache.org/ojb/docu/faq.html#optimisticLocking

regards,
Armin


Thanks Raghavan


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to