[jboss-user] [JBoss Cache: Core Edition] - is it possible for MVCCInvocationContext to have null mvccTC

dukehoops do-not-reply at jboss.com
Sat Mar 7 20:35:07 EST 2009


I have a JBC 3 cache instance configured to use a JTA transactionManager. Assuming that I have configured the cache instance properly, is it possible for a MVCCInvocationContext NOT to have reference to MVCCTransactionContext while thread of execution is inside MVCCInvocationContext.lookUpNode(fqn)?

Specifically, a thread is inside MVCCInvocationContext.lookUpNode(fqn) and mvccTx is (sometimes) null. See sample call stack below.

If this is NOT a valid state, does that mean that JBC isn't "seeing" my JTA txManager - ie I have a config problem?

If it is a valid state, please explain why so.

Here's a call stack:

anonymous wrote : 
  | org.jboss.cache.invocation.MVCCInvocationContext.lookUpNode(MVCCInvocationContext.java:64)
  | org.jboss.cache.commands.write.PutKeyValueCommand.perform(PutKeyValueCommand.java:78)
  | org.jboss.cache.interceptors.CallInterceptor.invokeCommand(CallInterceptor.java:108)
  | org.jboss.cache.interceptors.CallInterceptor.handleAlterCacheMethod(CallInterceptor.java:173)
  | org.jboss.cache.interceptors.CallInterceptor.visitPutForExternalReadCommand(CallInterceptor.java:137)
  | org.jboss.cache.commands.write.PutForExternalReadCommand.acceptVisitor(PutForExternalReadCommand.java:72)
  | org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | org.jboss.cache.interceptors.MVCCLockingInterceptor.handlePutForExternalReadCommand(MVCCLockingInterceptor.java:110)
  | org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor.visitPutForExternalReadCommand(PrePostProcessingCommandInterceptor.java:101)
  | org.jboss.cache.commands.write.PutForExternalReadCommand.acceptVisitor(PutForExternalReadCommand.java:72)
  | org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
  | org.jboss.cache.commands.AbstractVisitor.visitPutForExternalReadCommand(AbstractVisitor.java:70)
  | org.jboss.cache.commands.write.PutForExternalReadCommand.acceptVisitor(PutForExternalReadCommand.java:72)
  | org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:261)
  | org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:250)
  | org.jboss.cache.commands.AbstractVisitor.visitPutForExternalReadCommand(AbstractVisitor.java:70)
  | org.jboss.cache.commands.write.PutForExternalReadCommand.acceptVisitor(PutForExternalReadCommand.java:72)
  | org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:108)
  | org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutForExternalReadCommand(CacheMgmtInterceptor.java:102)
  | org.jboss.cache.commands.write.PutForExternalReadCommand.acceptVisitor(PutForExternalReadCommand.java:72)
  | org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
  | org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
  | org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutForExternalReadCommand(InvocationContextInterceptor.java:76)
  | org.jboss.cache.commands.write.PutForExternalReadCommand.acceptVisitor(PutForExternalReadCommand.java:72)
  | org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)
  | org.jboss.cache.invocation.CacheInvocationDelegate.putForExternalRead(CacheInvocationDelegate.java:459)
  | org.hibernate.cache.jbc2.util.CacheHelper.putForExternalRead(CacheHelper.java:295)
  | org.hibernate.cache.jbc2.util.CacheHelper.putForExternalRead(CacheHelper.java:268)
  | org.hibernate.cache.jbc2.access.TransactionalAccessDelegate.putFromLoad(TransactionalAccessDelegate.java:80)
  | org.hibernate.cache.jbc2.collection.TransactionalAccess.putFromLoad(TransactionalAccess.java:98)
  | org.hibernate.engine.loading.CollectionLoadContext.addCollectionToCache(CollectionLoadContext.java:333)
  | org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollection(CollectionLoadContext.java:279)
  | org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:245)
  | org.hibernate.engine.loading.CollectionLoadContext.endLoadingCollections(CollectionLoadContext.java:218)
  | org.hibernate.loader.Loader.endCollectionLoad(Loader.java:900)
  | org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:888)
  | org.hibernate.loader.Loader.doQuery(Loader.java:752)
  | org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
  | org.hibernate.loader.Loader.loadCollection(Loader.java:2015)
  | org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:59)
  | org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587)
  | org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83)
  | org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1743)
  | org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366)
  | org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108)
  | org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:131)
  | org.hibernate.collection.PersistentSet.isEmpty(PersistentSet.java:169)
  | com.doppelganger.domain.User.getCurrentUserSession(User.java:306)
  | com.doppelganger.framework.cache.LocalCacheTest$1.doInTransactionWithException(LocalCacheTest.java:62)
  | com.doppelganger.test.service.impl.DgTxAnnotationDependingTemplate.executeWithException(DgTxAnnotationDependingTemplate.java:22)
  | sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
  | sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | java.lang.reflect.Method.invoke(Method.java:597)
  | org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
  | org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
  | org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
  | org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
  | org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  | org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77)
  | com.doppelganger.service.tx.TxRetryAspect.doRetryIfNeeded(TxRetryAspect.java:114)
  | com.doppelganger.service.tx.TxRetryAspect.retryIfNeededForTxAnnotation(TxRetryAspect.java:90)
  | sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
  | sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | java.lang.reflect.Method.invoke(Method.java:597)
  | org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
  | org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
  | org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
  | org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160)
  | org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
  | org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
  | org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
  | $Proxy182.executeWithException
  | com.doppelganger.framework.cache.LocalCacheTest.testPutForExternalPutRemoveInTx1_readInTx2(LocalCacheTest.java:56)
  | sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java)
  | sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | java.lang.reflect.Method.invoke(Method.java:597)
  | junit.framework.TestCase.runTest(TestCase.java:168)
  | junit.framework.TestCase.runBare(TestCase.java:134)
  | org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
  | junit.framework.TestResult$1.protect(TestResult.java:110)
  | 

thanks
-nikita



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215969#4215969

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215969



More information about the jboss-user mailing list