简体   繁体   中英

How to archive a distributed (database) transaction between a java and c++ application?

I need to archive a distributed database transaction between a java and a c++ application in a way that both applications share the same transaction (can see uncommited data of this transaction).

Eg I'd like to do this:

  1. java application inserts some records
  2. java application invokes c++ code in a synchronous way (eg webservice)
  3. c++ code "joins" the same transaction and can read the previously inserted records and can modify some other data and returns
  4. the java application can see the modifications of the c++ application and can decide whether it should commit or rollback the transaction

Which approaches exists to do this? What pitfalls may arise?

Are there alternate solutions for my problem?

The solution may be oracle-specific (Oracle 10 would be fine), but a more general approach (at least on the java side) would be prefered, if equal.

我认为,由于事务绑定到数据库连接(据我所知),因此两个应用程序都需要通过一些通用服务来传达请求。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM