Bridging Transactions from Java EE to .NET
Bill Heinzman from JNBridge spoke at the recent JavaOne conference about bridging cross-platform transactions between enterprise Java and .NET applications. Both Java and .NET technologies implement the transaction management solution using a similar architecture and semantics with slight differences in protocol, but the transaction managers in Java and .NET don't play well with each other. It's difficult to implement and use the cross platform transactions between these two technologies. The two-phase commit (2PC) protocol is an inherently blocking protocol that does not scale well increasing latency, complexity and failure rate.
Bill gave an overview of transaction management API in both Java and .NET technologies. Java resource manager interface, XAResource, includes methods like start, end, prepare, forget, recover, commit and rollback to manage the distributed transactions across multiple data sources. And the .NET resource manager interface, IEnlistmentNotification, provides methods like Prepare, InDoubt, Commit and Rollback for distributed transaction management. He said Java has a "busier" implementation where the resource manager must handle multiple heuristic branches using a Xid token that consists of a transaction ID and a "branch" ID.
He also discussed the different technologies that provide cross-platform transactions using standards like WS-Atomic Transaction and WS-Coordination and direct bridging using a shared-memory, Java Virtual Machine (JVM)-to-CLR implementation.
WS-Atomic Transaction and WS-Coordination are web services based but they have poor performance. The database transactions are interoperable, but not the other enterprise resources such as messaging (JMS and MSMQ). Cross-platform transaction bridging using the interoperability provides the integration of active transactions on .NET and Java sides and lets the transaction managers reside in their sandbox. Cross-platform transaction integration is mostly transparent to user and works with all vendors’ JEE implementations. Java program can call a .NET application using transaction-enabled proxy using the JNBridgePro product which supports .NET-to-Java and Java-to-.NET cross-platform transactions with 2-Phase commit.
Bill concluded the session with a discussion of the future of distributed transaction management, Xtreme transaction processing and the transactions in Cloud Computing environment. Transactions in the cloud must be an abstract resource managed by the cloud and transactions between the cloud and the traditional web applications must be truly interoperable and transparent.
John Altidor, Yannis Smaragdakis Mar 30, 2015