0 Replies Latest reply on Jan 20, 2010 3:59 AM by girishadat

    JBC - JBoss Transactions pair

    girishadat

      I have an application with two JBoss PojoCache instances running in same JVM. The application performs some attach operations in the second cache depending on the attach in the first instance of cache and this is implemented using a POJOCacheListener attached to the first cache. I've configured the cache instances to make use of JBoss TS as the transaction manager, instead of the default DummyTransactionManager. The problem is that, I am getting PojoCacheExceptions caused by RollbackException from the JBoss TS. The fraction of occurance is very small - its around 1000 per 250 million attach operations - still it is there.

       

      org.jboss.cache.pojo.PojoCacheException: Error creating transaction
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.setupTransaction(PojoCacheImpl.java:197)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:99)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:93)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:88)
      at  [package/class name removed]
      at  [package/class name removed]
      at  [package/class name removed]
      at  sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at  java.lang.reflect.Method.invoke(Method.java:592)
      at  org.jboss.cache.pojo.impl.NotificationDispatcher.dispatch(NotificationDispatcher.java:256)
      at  org.jboss.cache.pojo.impl.NotificationDispatcher.dispatch(NotificationDispatcher.java:237)
      at  org.jboss.cache.pojo.impl.CacheListenerAdaptor.sendNotification(CacheListenerAdaptor.java:147)
      at  org.jboss.cache.pojo.impl.CacheListenerAdaptor.nodeModified(CacheListenerAdaptor.java:195)
      at  sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
      at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at  java.lang.reflect.Method.invoke(Method.java:592)
      at  org.jboss.cache.notifications.NotifierImpl$ListenerInvocation$1.run(NotifierImpl.java:702)
      at  org.jboss.cache.util.concurrent.WithinThreadExecutor.execute(WithinThreadExecutor.java:49)
      at  org.jboss.cache.notifications.NotifierImpl$ListenerInvocation.invoke(NotifierImpl.java:721)
      at  org.jboss.cache.notifications.NotifierImpl.notifyNodeModified(NotifierImpl.java:345)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.perform(PutKeyValueCommand.java:93)
      at  org.jboss.cache.interceptors.CallInterceptor.invokeCommand(CallInterceptor.java:108)
      at  org.jboss.cache.interceptors.CallInterceptor.handleAlterCacheMethod(CallInterceptor.java:173)
      at  org.jboss.cache.interceptors.CallInterceptor.visitPutKeyValueCommand(CallInterceptor.java:131)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at  org.jboss.cache.interceptors.MVCCLockingInterceptor.handlePutKeyValueCommand(MVCCLockingInterceptor.java:102)
      at  org.jboss.cache.interceptors.base.PrePostProcessingCommandInterceptor.visitPutKeyValueCommand(PrePostProcessingCommandInterceptor.java:88)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at  org.jboss.cache.interceptors.ReplicationInterceptor.handleCrudMethod(ReplicationInterceptor.java:150)
      at  org.jboss.cache.interceptors.ReplicationInterceptor.visitPutKeyValueCommand(ReplicationInterceptor.java:107)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
      at  org.jboss.cache.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:65)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at  org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:261)
      at  org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:250)
      at  org.jboss.cache.commands.AbstractVisitor.visitPutKeyValueCommand(AbstractVisitor.java:65)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at  org.jboss.cache.interceptors.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:108)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
      at  org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
      at  org.jboss.cache.interceptors.InvocationContextInterceptor.visitPutKeyValueCommand(InvocationContextInterceptor.java:82)
      at  org.jboss.cache.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:100)
      at  org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:287)
      at  org.jboss.cache.invocation.CacheInvocationDelegate.put(CacheInvocationDelegate.java:473)
      at  org.jboss.cache.pojo.impl.PojoCacheDelegate.putObject(PojoCacheDelegate.java:141)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:102)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:93)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.attach(PojoCacheImpl.java:88)
      at  [package/class name removed]
      at  [package/class name removed]
      at  [package/class name removed]
      Caused by:  javax.transaction.RollbackException:  [com.arjuna.ats.internal.jta.transaction.arjunacore.syncwhenaborted]  [com.arjuna.ats.internal.jta.transaction.arjunacore.syncwhenaborted] Can't  register synchronization because the transaction is in aborted state
      at  com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:476)
      at  com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronization(TransactionImple.java:451)
      at  org.jboss.cache.pojo.impl.PojoCacheImpl.setupTransaction(PojoCacheImpl.java:193)
      ...  58 more


      Can anyone advice me how to solve this problem?