At startup of my application I have to load a large amount of data in a synchronous replicated cache with a single transaction.

Is it possible to set a runtime an higher timeout than the default one only for this startup transaction?

Consider that in my application I have only one master node able to put data in cache, and all other nodes of grid can only perform get operations.

What is exactly the timeout I have to set? (i.e. what instruction I have to use?)

I saw these instructions for get timeouts:

  • cacheContainer.getDefaultCacheConfiguration().transaction().completedTxTimeout()

  • cacheContainer.getDefaultCacheConfiguration().clustering().stateTransfer().timeout()

cacheContainer is of type org.infinispan.manager.EmbeddedCacheManager, but I don't know if above timeouts can be set at runtime.

Is it enough to set the timeout of transaction by following method?

http://docs.oracle.com/javaee/1.4/api/javax/transaction/UserTransaction.html#setTransactionTimeout%28int%29

I mean, have I to set cluster state transfer timeout too? (if yes, how?)

Many Thanks

Francesco Sclano