JBoss Community

Re: How more than one XA Datasources participate in one container managed transaction ?

created by jboss.new.user in Datasource Configuration - View the full discussion

Hi Fink,

 

Thanks for replying.

 

Let's take this to elaborate a little.

 

JBoss AS is configured for JTS. One XA datasource is on dataSourceServer A and another XA datasource is on dataSourceServer B. All my EJBs are there on the same JBoss server (same node, single instance). Just for the sake of simplicity something is needed to be done on datasource A and datasource B where actionA and actionB corresponds to datasource A and datasource B respectively. Here actionA & actionB should be done as a part of one single transaction.

 

Now in case of BMT we can get the datasource via JNDI lookup and do the operation and complete the transaction by using TransactionManager of the JBoss or even by using XAResource and its lifecycle methods for two-phase commit.

 

But in case of CMT how we are going to achieve this. This is the point of confusion for me. How in case of CMT transactionManager will call the methods of two-phase commit ? How it will understand that which XA--Datasources are involved (is there any way to configure this ?) ?

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community