I read some information about 2 Phase Commit/ XA distributed transactions and how JTA does support it. Seems to be that there is many resource managers - RM (eg. RDBMS or JMS), and one TransactionManager (TM) instance that manages global transactions across many RM's.

I know that it's better to use Saga pattern, but it's still interesting to think:
- Do 2PC/XA distributed transactions give the possibility of conducting transactions with many RM's only from one application and one TM?
- If no - how to use 2PC/XA distributed transactions between many microservices to provide an ability to use 2PC, if each microservice have access only to own database? I would be glad to see an example
- Do we need to use TransactionManager service as a separate microservice to provide 2PC between many microservices?
UPD: In JTA world TransactionManager doesn't provide REST API for managing transactions across microservices. LIXA provides this ability. Article with examples in addition to answers :)