Thanks for sharing. I think that, as a matter of fact, XA and 2PC are the right solution for distributed transactions, far from these fantasist Saga ones.
However, I have a few comments:
1. I don't see any trace of the qurkus-narayana-jta extension in your pom.xml.
2. The Quarkus documentation states that "Quarkus doesn't support distributed transactions".
XA transactions are referred to as "distributed" in many places. And it is true but JTS distributed transactions are those which span multiple "containers/instances". XA transactions are those which involve multiple XA resources (database, JMS broker) and the latter is native for JTA as well.
JTS spans the distributed transactions over IIOP calls while JTA wit Naranyana spans the transactions differently over container local resources.
So, I think, you really need to read the documentation like this: Quarkus does support JTA but NOT JTS explicitly.
Thanks for these explanations Markus. My understanding is that "Quarkus supports JTA but not JTS" means that it supports the API but not the service itself. In other words, Quarkus doesn't provide a distributed transaction manager, but it has the required interfaces in order to access one, if any, in this case Narayana. Is that right ?
The other thing that I understood from what you explained is that quarkus-hibernate-orm extension includes quarkus-narayana-jta. Is that right ? If yes, is that specific to Quarkus or does Hibernate itself include Narayana, such that using it with another Java stack, for example, Spring Boot, would work in a similar way ?
Thanks for sharing. I think that, as a matter of fact, XA and 2PC are the right solution for distributed transactions, far from these fantasist Saga ones.
However, I have a few comments:
1. I don't see any trace of the qurkus-narayana-jta extension in your pom.xml.
2. The Quarkus documentation states that "Quarkus doesn't support distributed transactions".
Could you please clarify ?
Thanks Nicolas. That is a very good question.
You can see Narayana in the dependency:tree. Just "mvn dependency:tree" and grab "jta".
Most of the time, you don't need to worry about it explicitly. Hibernate ORM for example will include the transaction manager and set it up properly.
The mention of not supporting "distributed transactions" (here: https://quarkus.io/guides/transaction) is tricky.
XA transactions are referred to as "distributed" in many places. And it is true but JTS distributed transactions are those which span multiple "containers/instances". XA transactions are those which involve multiple XA resources (database, JMS broker) and the latter is native for JTA as well.
JTS spans the distributed transactions over IIOP calls while JTA wit Naranyana spans the transactions differently over container local resources.
So, I think, you really need to read the documentation like this: Quarkus does support JTA but NOT JTS explicitly.
Thanks for these explanations Markus. My understanding is that "Quarkus supports JTA but not JTS" means that it supports the API but not the service itself. In other words, Quarkus doesn't provide a distributed transaction manager, but it has the required interfaces in order to access one, if any, in this case Narayana. Is that right ?
The other thing that I understood from what you explained is that quarkus-hibernate-orm extension includes quarkus-narayana-jta. Is that right ? If yes, is that specific to Quarkus or does Hibernate itself include Narayana, such that using it with another Java stack, for example, Spring Boot, would work in a similar way ?
Even better questions. Your digging deep. Let me circle back with someone who has all the answers and share them here. Thanks for your patience!