Flylib.com

Books Software

 
 
 

Part III: Cross-Platform Interoperability


Part III: Cross-Platform Interoperability

Chapter List

Chapter 8: Interoperability Solutions from Third-Party Vendors
Chapter 9: Best Practices, Design Patterns, Security, and Business Solutions



Chapter 8: Interoperability Solutions from Third-Party Vendors

In today’s rapidly developing digital economy, businesses must reevaluate their methods of doing business in a distributed environment, preserving their heavy investment in legacy code while merging with the new technologies offered by Sun’s Java platform and Microsoft’s .NET Framework. J2EE and .NET provide numerous technologies to achieve interoperability, both internally and externally. For example, J2EE offers support for the constantly improving new technologies such as connectors and web services, whereas .NET provides multilanguage interoperability. Considering the success of the two diverse platforms and their unique approach to building distributed applications, how is it possible to take advantage of both technologies and build cross-platform applications?

Writing and Deploying Applications 
for Any Platform

Developing distributed applications in either J2EE or .NET presents a problem for the programmer: selecting a platform before writing the application. Which approach will solve a particular need? Java’s philosophy is to write an application and deploy it on any platform containing a JVM. Only one caveat exists: the application must be written in the Java language.

Conversely, .NET offers developers multilanguage interoperability. A .NET application can run on any platform that has the .NET Framework on it. This is similar to a JVM, where Java bytecode can run on any platform where a copy of the JVM exists. However, currently only the Windows platforms have the Framework on them.

Enter third-party vendors. JNBridge LLC and Intrinsyc Software are two major vendors of cross-platform technologies for J2EE and .NET. Both have recognized the predicament developers face when attempting to make their choice between J2EE and .NET technologies, and they offer interoperability solutions that share much in common:

  • Support for enterprise application servers, including WebSphere, BEA WebLogic, Oracle9 i , Borland Enterprise Server, and JBoss

  • Support for HTTP and TCP/IP protocols

  • Support for SOAP

  • Support for binary messages

  • Client-activated and server-activated objects

  • Invocation of methods on Java objects from the CLR

  • Invocation of methods on CLR objects from Java

  • Support for passing Java/CLR objects by reference and by value as parameters/return values

  • Marshaling objects by value or by reference

  • Callbacks

It is no longer necessary for developers to make a critical choice. JNBridge LLC’s product, JNBridgePro, and Intrinsyc’s Ja.NET bridge the gap between Java and .NET.

JNBridge’s cross-platform technology is available in two versions: SE (Standard Edition) and EE (Enterprise Edition). The Enterprise Edition is covered in this chapter. But before going into the details of JNBridgePro, we’ll take a brief look at Intrinsyc’s solutions.



Ja.NET and J-Integra

Ja.NET makes it possible to write clients for Enterprise JavaBeans in a .NET language targeting the .NET Framework. Using any language hosted by the Framework in conjunction with Ja.NET facilitates interoperability between Java objects or entity JavaBeans. Additional features permit reusing components written in Java within the .NET environment or vice versa. In essence, Ja.NET Java components act as though they are Microsoft .NET, and vice versa, because Ja.NET leverages .NET remoting.

Ja.NET provides a tool called GenJava to generate a Java proxy for .NET components. For example, access to an Internet Information Server (IIS) component from Java is easy. The Janetor tool configures the Ja.NET runtime. Then, Java clients can use the proxies to access a remote CLR component as though it were a local Java component. The tool can also generate a .NET component bearing proxies for Enterprise JavaBeans client-side classes. Then, Janetor generates a web application archive (WAR) file containing all web server– deployable files. Another beneficial feature permits the CLR client written in any language to access Enterprise JavaBeans as though they were local CLR components.

Intrinsyc Software has another interop tool called J-Integra. It is a COM-Java tool employed for accessing ActiveX components as though they are Java objects. Conversely, accessing Java objects as though they are Microsoft .NET components is allowed. J-Integra works seamlessly with any Java Virtual Machine on any platform and requires no native code. Additionally, J-Integra speaks native DCOM and is layered over Remote Procedure Calls. J-Integra requires no JVM or additional software installs on the COM platform.

Ja.Net and J-Integra technologies are worth pursuing. You can freely download these solutions. Because URLs change frequently, I recommend that you search for them through your favorite search engine. Although this chapter does not examine Intrinsyc Software’s solutions, this does not reflect on the quality of their products. Check them out. They offer an excellent alternative to JNBridgePro.