What am I doing wrong?
I have the following in standalone.xml
<local-cache name="realmVersions"> | |
<transaction mode="BATCH" locking="PESSIMISTIC"/> | |
</local-cache> |
My cache is throwing an exception when invoking cache.getAdvancedCache().lock()
Caused by: java.lang.UnsupportedOperationException: Calling lock() on non-transactional caches is not allowed
at org.infinispan.cache.impl.CacheImpl.lock(CacheImpl.java:820)
Here's my embedded config which works:
ConfigurationBuilder counterConfigBuilder = new ConfigurationBuilder(); | |
counterConfigBuilder.invocationBatching().enable() | |
.transaction().transactionMode(TransactionMode.TRANSACTIONAL); | |
counterConfigBuilder.transaction().transactionManagerLookup(new DummyTransactionManagerLookup()); | |
counterConfigBuilder.transaction().lockingMode(LockingMode.PESSIMISTIC); | |
Configuration counterCacheConfiguration = counterConfigBuilder.build(); |
cacheManager.defineConfiguration(VERSION_CACHE_NAME, counterCacheConfiguration); |
NEVERMIND!!!! I wasn't importing a dependency in my subsystem for it.