0 Replies Latest reply on Jul 6, 2009 11:54 AM by Fedor Cherepanov

    JTA transactions with Atomikos and cache loaders

    Fedor Cherepanov Newbie

      Hello, I've got a problem with JTA transactions using atomikos transaction manager implementation.

      I'm using atomikos 3.4.4 and jboss-cache 3.0.2, I know that these are not the latest, but I've checked at least jboss-cache 3.1.0 sources and it looks like it's the same there, let me know if it's not true.

      Issue is that cache loader commit is never being called, and that is caused by the fact that atomikos removes transaction from current thread between handlePrepareCommand(...) and handleCommitCommand(...) is being called on CacheStoreInterceptor.

      After calling beforeCompletion() transaction is being removed from the thread, so when afterCompletion() and then CacheStoreInterceptor.handleCommitCommand is being invoked (with a command containing global transaction handle), CacheStoreInterceptor.inTransaction() returns false and the command is just ignored.

      Please let me know if it's a known issue with atomikos (or it's their issue?).