JNBridge Brings Distributed Transactions Across Java and .NET Code
JNBridge is a technology that allows Java and .NET code to share objects without relying on cross-compilers. The Java code runs entirely on the JVM while .NET code runs on the CLR. Under this scheme, the JVM and CLR may be running on the separate machines, separate processes on the same machine, or even in the same process. From the developer’s perspective, objects running on the other virtual machine are merely proxied remote objects. JNBridge has a long history, with the first version becoming available back in June of 2002. Amongst its more prominent customers is Adobe’s ColdFusion, whose .NET support we first reported in 2007.
The new version of JNBridge brings the ability to easily distribute transactions across virtual machines. The key word here is easy, developers could always manually do the work necessary for two-phase commits. Using JNBridge 5.0, the necessary plumbing to hook into System.Transaction on the .NET side and javax.transaction on the Java side is taken care of for you. Aside from some configuration and a call to either JavaTM.enable or DotNetTM.enable, everything looks and behaves just like native transactions.
In order to use JNBridge, developers will need to become familiar with the proxy generation tool. This tool is available in both a standalone form and as a plug-in for Eclipse and Visual Studio. The Eclipse version is actually a testimony to the power of JNBridge, as it is actually written in .NET/WinForms.
The GUI hosting works both ways, with Java AWT and Swing components being embeddable within WinForms and WPF applications. This is used a lot by companies that have built up highly specialized controls such as molecular visualizers in Java and want to offer their technology to .NET developers without a massive porting effort.
Currently there are no plans to officially support Mono and Silverlight. While the underlying technologies needed by JNBridge are avaialble in Mono and Silverlight 4, developers are pretty much on their own when something goes wrong. By contrast, the supported platforms have extensive documentation.
Shane Hastie Aug 30, 2014
Roy Rapoport Aug 28, 2014