What happens is that an NPE is raised upon invocation of EntityManager#lock() or similar as the map with lockers never gets initialized. Apparently the locking code in InfinispanDialect has never really been tested. When adding the call to initLockers() the eager exception throwing in GridDialect#getLockingStrategy() is the next thing we're falling over.
Having dialects return either a proper strategy or null - if they don't support a given lock mode - seems sensible to me. In core we then can feed the exception-throwing strategy into the machinery.
|