... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-05-11

ALDSP 2.1 Optimistic Concurrency

When updating, ALDSP generates SQL statements like

UPDATE MY_TABLE SET MY_COLUMN='NEW VALUE' WHERE MY_ID='PRIMARY KEY' AND MY_COLUMN='OLD VALUE'

and inspects the update count to see whether a concurrency error has occurred.  The set of columns that are checked in this way can be either all columns in the SDO object, only the modified columns, or a set of user-specified columns.  However, it turns out that ALDSP will quietly drop columns of data types that are difficult to compare for equality.  At time of writing, this set reasonably includes BLOB, CLOB, LONGVARBINARY, LONGVARCHAR, VARBINARY, and BINARY.  Just as reasonably, but perhaps unintuitively, it also includes FLOAT and DOUBLE.

The list of troublesome data types was gleaned from the methods getUpdateSql() and canBeIncluded() in the class com.bea.ld.dsmediator.update.SQLGenerator.

See also the exchange on this topic in BEA's newsgroups.

Blog Archive