{{EntityPersister}} exposes a {{lock}} operation. It uses a list of { { LockingStrategy}} s which are provided by {{GridDialect.getLockingStrategy}}. But this list is built by {{initLockers}} which is never called by {{OgmEntityPersister}}.
We need to think about what will happen when callers of {{EntityPersister.lock}} are executed (is that a fair use in OGM?). And we need to clean up {{GridDialect}} implementation that sometimes return an implementation, sometimes throw an exception (seems wrong), sometimes return null.
I *think* the right thing is to return a {{LockingStrategy}} that does throw an exception when called on a dialect not supporting locking.
Should each involved dialect return an implementation of this {{ThrowUponLockLockingStrategy}} or should they return {{null}} and have the OGM engine build this strategy when {{null}} is returned.
This needs some investigation and thinking.
I am adding it to the final version as it would be cleaner but if really pressed we could delay that work.
|