开发者

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).

E.g. I'd like to do this:

  1. java application inserts some records
  2. java application invokes c++ code in a synchronous way (e.g. 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 appl开发者_JAVA百科ication 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.


I think since transactions are bound to a database connection (that I know of) both of the applications would need to communicate requests through some common service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜