[Opensource] some doubts about transaction
Michael Rimov
rimovm at centercomp.com
Mon Aug 5 22:46:44 PDT 2002
At 06:12 PM 8/2/2002 +0000, you wrote:
>Hello guys,
<snip>
>There is another problem though. Let us say that I have started a
>trasnaction. I create record int table A, then a record in table B that
>uses some data from the record in A, then I update record A with the B.id
>that is auto-increment field. However as the transaction is not completed
>DBObject.getValuedDefault will tell you that such a record does not exist.
>Why? Because those values must be either in the cash or in the DB.
>getValuesDefault should use localConnection as well when a trasaction has
>been started.
>
>if(localConnection!=null && !localConnection.getAutoCommit()) {
>//do not use cache
>} else {
>myValues = CacheManager.getItems(getDBName(), cacheName);
>}
Bug fixed.
>Now, contemplating on DBObject.getValuedDefault some doubts popped into my
>head. What if someone has added a record in some table X and someone else
>requests the ValidValues for X, and as these had been stored in the cash
>already, the call to ValidValues brings outdated info?
>Maybe I am wrong but I just wanted to share my "fears" with you :-).
Addressed in previous email. I'd look forward to hear your analysis.
-Mike
More information about the Opensource
mailing list