How to use CheckedAction in EAP 6.x?
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
andCheckedActionFactory
? We have implemented our owncom.arjuna.ats.arjuna.coordinator.CheckedAction
andCheckedActionFactory
in a JBoss module. Previously we could activate our customCheckActionFactory
by setting the system propertycom.arjuna.ats.coordinator.checkedActionFactory
. It seems that the new way to specify a customCheckedActionFactory
is through the propertyCheckedActionFactoryClassName
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.