2
votes

I have tested Atomikos JTA using single database transaction and works great. But I don't see any examples for transactions across two database. Note: I am using Atomikos standalone API (i.e. not with Spring / Hibernate or other framework).

What I want is write a single transaction that insert/update/commit into two seperate database (Oracle-Oracle for my testing). It performs commit if both are successful or rollback if any exception.

I am looking for any configuration that is required OR sample code for such example.

Really appreciate any pointers. Thanks!

1

1 Answers

0
votes

There is no any difference with single DataSource configuration actually. here is the example that i've written in github. Be sure that you use XADataSource and not the ordinary DataSource, but this is the same for the single DataSoucre case.