0 Replies Latest reply on Aug 28, 2016 4:07 PM by karlnicholas

    Transaction Reaper and Bean Managed Transactions

    karlnicholas

      I'm running into a problem with a BMT and the arjuna transaction reaper. I have a bean that uses BMT and it does a lengthy series of database operations. At first it did them all in one transaction, but when I started having problems I split them up into lots of little transactions. However, that didn't fix the problem of the transaction reaper closing down my BMT transaction five minutes after I start it up.

       

      So, now I'm wondering if I'm correct that the transaction reaper just doesn't like the fact that my bean runs for more than five minutes even though it is not one continuous transaction. Do I need to repeatedly get and release a UserTransaction instance multiple times within the bean? Currently it has a annotation for the UserTransaction which the container injects.

       

      @Resource UserTransaction tx;

       

      I need a bean managed transaction because it's a scheduled service and so it won't have a container manager transaction. At this point I'm not sure how to get a UserTransaction without the @Resource annotation? Is there a way to do it or do I have to break my bean up into many smaller beans?

       

       

       

      33m01:05:00,077 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffffac1009c9:-26899d76:57c1f86a:77d in state  RUN

      33m01:05:00,169 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffffac1009c9:-26899d76:57c1f86a:77d

      33m01:05:07,471 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffffac1009c9:-26899d76:57c1f86a:782 in state  RUN

      33m01:05:07,475 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012095: Abort of action id 0:ffffac1009c9:-26899d76:57c1f86a:782 invoked while multiple threads active within it.

      33m01:05:07,580 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012381: Action id 0:ffffac1009c9:-26899d76:57c1f86a:782 completed with multiple threads - thread EJB default - 1 was in progress with java.lang.reflec