[infinispan-commits] Infinispan SVN: r2008 - trunk/core/src/main/java/org/infinispan/interceptors.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Fri Jul 9 03:46:26 EDT 2010
Author: mircea.markus
Date: 2010-07-09 03:46:26 -0400 (Fri, 09 Jul 2010)
New Revision: 2008
Modified:
trunk/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java
Log:
migrated 2007 to trunk
Modified: trunk/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java 2010-07-09 07:43:37 UTC (rev 2007)
+++ trunk/core/src/main/java/org/infinispan/interceptors/BatchingInterceptor.java 2010-07-09 07:46:26 UTC (rev 2008)
@@ -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