I'd like to know what would happen with the new Infinispan 5.1.0.CR1 "use1PcForAutoCommitTransactions" feature if we're using a transactionnal pessimistic cache like this :
// begin transaction
// lock key
// get value from key
String value = cache.get("key");
// do some business logic, that would lead to an update
// finally, commit
if I understand well, being pessismistic ensure there won't be any concurrent modification on the key, tough, in this scenario we do not rely on auto commit. would it be possible to gain access to 1PC even tough we're not using autoCommit or there's something I'm missing ?
Well, you're managing a transaction, so autoCommit won't do anything, hence use1PcForAutoCommitTransactions has no impact here.
autoCommit comes in action when you're calling a cache operation outside a tx and the cache is configured to be transactional.