[infinispan-commits] Infinispan SVN: r2007 - branches/4.1.x/core/src/main/java/org/infinispan/interceptors.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Fri Jul 9 03:43:38 EDT 2010
Author: mircea.markus
Date: 2010-07-09 03:43:37 -0400 (Fri, 09 Jul 2010)
New Revision: 2007
Modified:
branches/4.1.x/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java
Log:
added doc
Modified: branches/4.1.x/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java
===================================================================
--- branches/4.1.x/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java 2010-07-08 12:10:19 UTC (rev 2006)
+++ branches/4.1.x/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java 2010-07-09 07:43:37 UTC (rev 2007)
@@ -62,8 +62,11 @@
if (transactionManager.getTransaction() == null && (tx = batchContainer.getBatchTransaction()) != null) {
try {
transactionManager.resume(tx);
- //this will make the call with a tx invocation context
- return invokeNextInterceptor(icc.createInvocationContext(), command);
+ //If there's no ongoing tx then BatchingInterceptor creates one and then invokes next interceptor,
+ // so that all interceptors in the stack will be executed in a transactional context.
+ // This is where a new context (TxInvocationContext) is created, as the existing context is not transactional: NonTxInvocationContext.
+ InvocationContext txContext = icc.createInvocationContext();
+ return invokeNextInterceptor(txContext, command);
} finally {
if (transactionManager.getTransaction() != null && batchContainer.isSuspendTxAfterInvocation())
transactionManager.suspend();
More information about the infinispan-commits
mailing list