Since it is becoming more and more clear to me that most people
using WebLogic with Oracle do not use an isolation of SERIALIZABLE,
I am trying to understand how to use READ-COMMITTED isolation.
Does anyone use SERIALIZABLE?  What do you do with the
"could not serialize access" errors?

Anyway, I digress.  I want to see how I can use READ-COMMITTED
and still ensure data integrity.

If I want to read some persistent data, and then based on that data,
write a new value of that data, and make sure that this happens
only once (i.e. I don't want another transaction to read the same
data and write the same new value), how can I ensure that?

For example, assume I am trying to implement a counter, which
counts the number of time the entity field is updated, by having
its value incremented each time the method is called.

Certainly, if 2 transactions are using READ-COMMITTED, they
could both read the same current value, and then try to write the
same new value.

My question is, what happens at this point?  Assume the first
transaction successfully writes and commits an incremented
value for the counter.  What happens with the other transaction.
Is it locked out while the other is writing and committing?  Won't
it still try to write the same value again, instead of the next value
in the sequence?  Are there any exceptions thrown?

Is this just not something that people implemented with
READ-COMMITTED?

Jason
"Building Trust in Transactions (sm)"
SquareTrade

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to