Stein M. Hugubakken wrote:

In SQLEngine.generateKey you have this code:


synchronized (connection) {
    identity = _keyGen.generateKey( connection, _clsDesc.getTableName(),
         _ids[0].name, prop );
}

Why is it synchronized on connection, because of relation with bug 1507?

Only UUIDKeyGenerator is not thread-safe as I can see, is it necessary to synchronize the gey-generation for every key-generator type?


What I was trying to say was that synchronized is a KeyGenerator-implementation detail.


MAX-generator is also dependent on synchronized, but it is not correct to have synchronized on connection because two concurrent key-generations on the same table could pose a problem.

Stein

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to