How to use CheckedAction in EAP 6.x?

Solution Verified - Updated -

Issue

  • In a multi-threaded application, multiple threads may be associated with a transaction during its lifetime, sharing the context. In addition, it is possible that if one thread terminates a transaction, other threads may still be active within it. In a distributed environment, it can be difficult to guarantee that all threads have finished with a transaction when it is terminated. 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. Therefore, TxCore provides the com.arjuna.ats.arjuna.coordinator.CheckedAction class, which allows the thread or 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.

  • See JBTM-2279

  • How to implement CheckedAction and CheckedActionFactory? We have implemented our own com.arjuna.ats.arjuna.coordinator.CheckedAction and CheckedActionFactory in a JBoss module. Previously we could activate our custom CheckActionFactory by setting the system property com.arjuna.ats.coordinator.checkedActionFactory. It seems that the new way to specify a custom CheckedActionFactory is through the property CheckedActionFactoryClassName on the bean CoordinatorEnvironmentBean. The question is how do to change this property?

Environment

  • Red Hat JBoss Enterprise Application Platform(EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content