There are a number of refactorings that I think should be made to TXFramework (AKA Compensations API). In this post I'll present my ideas for the community to review.
1) Remove the old TXFramework API (JBTM-2221).
The original TXFramework API focused on bringing usability improvements to ACID and Compensating transactions. The ACID improvements related to WS-AT and REST-AT and were thus moved over to those components. Also, those improvements specific to WS-BA were also moved over to XTS. Last summer an API was developed that focused just on Compensating Transactions. There is now no need to keep around the remnants of the TXFramework API, so it should be removed.
2) Package name change 'org.jboss.narayana.compensations' -> 'org.jboss.narayana.compensations.cdi' (JBTM-2223)
The current package name doesn't leave any room for other APIs. For example, the Hibernate OGM team have expressed an interest in using Compensating Transactions. I also think something could be done with Vert.X, Fuse and maybe LiveOak. Changing the package name would be best done sooner rather than later.
3) Rename TXFramework -> Compensations (JBTM-2222)
As stated in 1), TXFramework now just focuses on Compensating transactions. The ACID transaction improvements have been moved into XTS and REST components. Therefore, I think we should drop the TXFramework name in favour of "Compensations" or "Compensating Transactions".
4) Move Compensations dependency adder to transactions subsytem (JBTM-2224)
The XTS WildFly SubSystem has some code that detects the usage of the Compensating transactions API and then adds the required dependencies to the application. The XTS SubSystem is only loaded in the standalone-xts.xml configuration. This has become a problem, since the Compensating transactions API can now also be used with the standalone.xml configuration for local-only transactions. Therefore, I think we should move this dependency adding code into the Transactions SubSystem so that the required dependencies are added regardless of which WildFly configuration is used.
I have raised a Pull Request for these changes: https://github.com/jbosstm/narayana/pull/688.