Unfortunately there isn't a standard for auto-enlistment of XAResources into a transaction.
One of the mechanisms that is used in WildFly is a UserTransactionListener:
Alternatively, you can wrap the driver and when (for example) JDBC::getConnection() is called it can detect whether or not a transaction is inflight and if so it can perform the necessary enlistment operations. This is approach that appears to be advocated in the Fuse docs you referenced.
Hope it helps,
I have now finally gotten around to read J2EE Connector Architecture and Enterprise Application Integration (12.3.1 Creating new Connections; page 206)and thought it might help others to document here what I've learned.
It seems that the JEE containers perform the "auto enlistment" in the call sequence:
The ConnectionFactory and the ManagedConnectionFactory are under the control of the ResourceAdapter and the ConnectionManager may be under the control of the JEE container. The spi.ManagedConnectionFactory also serves as a factory for the cci.ConnectionFactory [Object createConnectionFactory(ConnectionManager cxManager)] and at that point takes the ConnectionManager as an argument. Like that the ConnectionManager can intercept the getConnection() calls and perform the "auto enlistment".
JCA is cool that way
You likely need a XATransaction capable resource adapter, and don't use CCI - it is horrible and broken. Feel free to join the IronJacamar community for additional pointers
Wow, there is a complete resource adapter code generator. I did not know that. Thanks for pointing me towards the documentation. I will have a look at it and join the IronJacamar community.