XA transaction in database connection

In a Java action, I interleaf the updates to data and calls to library that commits in another schema using another db connection pool. I need to ensure that the Mendix transaction and the external transactions remain in sync. i.e. If the external txn fails then Mendix transaction should fail. And vice versa. Seems need for 2 phase commit by XA transaction. How do we make Mendix use XA driver? Or is there another way? e.g. Using the action EndTransaction  to make commit in Mendix, just so we can be sure of commit status on Mx side and accordingly call the library to mark it as errored or retryable. 
0 answers