[infinispan-dev] batching and auto-commit

Mircea Markus mircea.markus at jboss.com
Wed Sep 14 12:01:14 EDT 2011


Hi,

ATM I cannot enable both batching and auto-commit[1] because the way the batching is implemented:
- it starts a tx, suspends it and and holds it in a thread local so that when a put arrives it can resume it
- when I do a put in a batch, the auto-commit code which runs first doesn't see any tx associated with the thread and starts and commits a new tx

Is there any reasons why the batch container/interceptor doesn't want to expose the batch induced transaction to the outside world? The only drawback I see with that is  if some other XA resource is used within the batch, it will participate in the dist tx.

[1] auto-commit is a new feature in 5.1 which injects a tx for transactional caches so that user won't have to start/stop one for single key operations.

Cheers,
Mircea  


More information about the infinispan-dev mailing list