I got the answer. It was answered by Wolf-Dieter Fink. It's here
xa transaction with CMT
-
06-12-2021 - |
Question
Recently I am involved in dealing with distributed transaction with JBoss 5.1 wherein Container Managed Transaction is used. But my worry is I am not understanding how different xa-resources are participating in the distributed transaction managed by JBossTS transaction manager. Basically I am looking for what are the transaction boundaries. And where I should put my code which I want to be executed as part of the transaction ? And also how container would understand which bean belongs to which xa-datasource.
I have already googled and tried to get something from JBoss documentation but couldn't find anything useful.
I already know how to configure datasources and transaction manager.
Any help would be appreciated.
Thanks in advance.
Solution