4 Replies Latest reply on Dec 1, 2008 7:31 AM by Mark Little

    how to add a CheckedAction to EJB3 app

    mazz Master

      Chapter 3, "General Transaction Issues", Section 1.1, "Checking Transactions" of this doc:

      http://www.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.3.0.cp02/pdf/JBoss_TS_Programmers_Guide/JBoss_TS_Programmers_Guide.pdf

      says the following:

      By default, TxCore will issue a warning if a thread terminates a transaction when other threads are still active within it; however, it will allow the transaction termination to continue. Other solutions to this problem are possible, e.g., blocking the thread which is terminating the transaction until all other threads have disassociated themselves from the transaction context. Therefore, TxCore provides the com.arjuna.ats.arjuna.coordinator.CheckedAction class, which allows the thread/transaction termination policy to be overridden. Each transaction has an instance of this class associated with it, and application programmers can provide their own implementations on a per transaction basis.


      How can I provide my own CheckedAction class to override the default implementation within my EJB3 app? For example, if I have this as a method in one of my SLSBs:

      @TransactionTimeout(60)
      public void method mySLSBMethod() {...


      How can I install my own CheckedAction implementation class to its transaction?