简体   繁体   English

如何归档Java和C ++应用程序之间的分布式(数据库)事务?

[英]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). 我需要将Java和C ++应用程序之间的分布式数据库事务归档,使两个应用程序共享同一事务 (可以看到此事务的未提交数据)。

Eg I'd like to do this: 例如,我想这样做:

  1. java application inserts some records Java应用程序插入一些记录
  2. java application invokes c++ code in a synchronous way (eg webservice) Java应用程序以同步方式(例如Web服务)调用C ++代码
  3. c++ code "joins" the same transaction and can read the previously inserted records and can modify some other data and returns C ++代码“加入”同一事务,并且可以读取先前插入的记录,并且可以修改某些其他数据并返回
  4. the java application can see the modifications of the c++ application and can decide whether it should commit or rollback the transaction Java应用程序可以查看c ++应用程序的修改,并可以决定是提交还是回滚事务

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. 该解决方案可能是特定于oracle的(Oracle 10会很好),但是如果相等的话,则首选更通用的方法(至少在Java方面)。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Core Java应用程序中的分布式事务管理 - Distributed Transaction management in Core Java application Java Application和C ++ Application之间的通信 - Communication between Java Application and C++ Application 如何管理Web服务调用和数据库之间的分布式事务协调? - How to manage distributed transaction co-ordination between webservice calls and database? C ++和Java应用程序之间的NamedPipe进程间 - NamedPipe interprocess between c++ and Java application 如何构建分布式Java应用程序? - How to build a distributed java application? Spring MVC-分布式数据库事务 - Spring MVC - Distributed Database Transaction 如何在Java应用程序和C / C ++客户端之间通过客户端身份验证实现TLS加密 - How to implement TLS encryption with client authentication between a Java application and a C/C++ client 分布式事务.net Java SAP - distributed transaction .net java SAP 如何解决java.sql.SQLException等待锁定的分布式事务 - How to resolve java.sql.SQLException distributed transaction waiting for lock 如何在涉及jdbc,jms和webservices的java中执行分布式事务 - How to do distributed transaction in java involving jdbc,jms and webservices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM