[infinispan-dev] batching and auto-commit

2011-09-14 Thread Mircea Markus
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  
___
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev


Re: [infinispan-dev] batching and auto-commit

2011-09-14 Thread Manik Surtani

On 14 Sep 2011, at 17:01, Mircea Markus wrote:

 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.

Yup, that's the reason.  

--
Manik Surtani
ma...@jboss.org
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org



___
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev