2 Replies Latest reply on Feb 22, 2012 4:06 AM by sudheerk84

    Understanding infinispan resource(cache) addition/notifications under JTA transatcions

    sudheerk84

      I was looking at the logs and i have observed the following ...

       

      I have a JTA transaction in which i am doing multiple cache gets and a single cache commit. But i see mulitple of these lines indicating that all the resources (cache) have been added to teh JTA resources list

       

      2012-02-13 12:31:52,214 [serviceTaskExecutor-9] INFO  atomikos.println:110  - addParticipant ( XAResourceTransaction: 746D5F74737065782D6170702D636F6E7461696E65725F3130303137323030303837:5472616E73616374696F6E5861416461707465727B6C6F63616C5472616E73616374696F6E3D4C6F63616C5861323234 ) for transaction tm_tspex-app-container_10017200087

      2012-02-13 12:31:52,215 [serviceTaskExecutor-9] INFO  atomikos.println:110  - XAResource.start ( 746D5F74737065782D6170702D636F6E7461696E65725F3130303137323030303837:5472616E73616374696F6E5861416461707465727B6C6F63616C5472616E73616374696F6E3D4C6F63616C5861323234 , XAResource.TMNOFLAGS ) on resource TransactionXaAdapter{localTransaction=LocalXa represented by XAResource instance TransactionXaAdapter{localTransaction=LocalXaTransaction{xid=null} LocalTransaction{remoteLockedNodes=null, isMarkedForRollback=false, transaction=tm_tspex-app-container_10017200087} org.infinispan.transaction.xa.LocalXaTransaction@a1e3195b}

       

      Similarly i see multiple transations being started

       

      2012-02-13 12:31:52,221 [serviceTaskExecutor-9] TRACE org.infinispan.transaction.xa.TransactionXaAdapter.tracef:1815  - start called on tx GlobalTransaction:<TSSEDEV5-47032>:189:local

       

      Because of teh above , i have teh following implications

       

      I get many(equal to teh number of caches in teh transaction - event get calls ) cache committed events, increasing my network traffic, inspite of me changing only one cache.

       

      Is there any optimization i can do ?  I assumed it was teh REPEATABLE_READ which was cauing these caches to be added. Even when i set isolation level to REAAD_COMMITTED, i see teh same behaviour.

       

      Also can i do soem kind o f batching to reduce teh number of these intra Vm calls ?