In today’s digital economy, it is becoming imperative to integrate legacy systems, business applications, and code with emerging new technologies. Interoperability, the subject of this text, explores the two major platforms— Microsoft .NET. and J2EE .NET & J2EE Interoperability provides an in-depth examination of how these two major platforms interact with each other from a developer’s point of view. Numerous examples demonstrate how .NET and J2EE provide application integration. For example, Chapter 5 examines the Common Language Runtime (CLR) and explains how it serves as a web container, similar to IBM’s WebSphere. It provides low-level services such as memory management, automated garbage collection, and security to ASP.NET, ADO.NET, and all languages targeting the .NET Framework.
The first four chapters focus on J2EE technologies, and Chapters 5, 6, and 7 concentrate on .NET. Chapter 8 introduces JNBridgePro, an innovative business solution providing true cross-platform interoperability between J2EE and .NET. JNBridgePro technology allows developers to generate proxies that facilitate two-way integration. A Java developer can access .NET functionality directly, just as .NET developers can leverage Java technologies. JNBridge business solutions represent a significant advance in facilitating interoperability.
Chapter 1, “Interoperability in the Enterprise,” serves as an introduction and chapter- by-chapter overview of internal and external integration between the two major platforms. For example, the discussion on technology interoperability between J2EE and .NET and their mutual support for web services introduces the central theme of this book.
The chapter introduces a case study intended to serve as a focal point for illustrating particular concepts in Java or .NET. A finance corporation called International Finance Corporation Exchange (IFCE) buys and sells foreign currency. The study focuses on business process; for example, IFCE checks the status of a customer to determine whether he or she has established an account. In the final chapter, a project built in Visual Basic .NET illustrates how to create a currency converter. A currency amount entered in the dialog box, for example, in British pounds, can be converted to the euro, or to German marks, or another currency.
Chapter 2, “J2EE Servlets, Java Server Pages, and Web Services,” begins with a brief description of Sun Microsystems’ three development platforms, namely, Java 2 Platform, Micro Edition (J2ME); Java 2 Platform, Standard Edition (J2SE); and the Java 2 Platform, Enterprise Edition (J2EE).
The three technologies discussed in this chapter are communications between applications, the presentation layer, and the business applications layer.
A detailed discussion focuses on Java servlets, Java Server Pages, and their respective roles in creating a distributed enterprise application. Topics include a servlet’s life cycle, management of session state with servlets, Java Server Pages (JSPs), and JSP page directives and how to apply them when returning requested results to a client.
Chapter 3, “Enterprise JavaBeans, Interfaces, and JDBC Persistence,” begins with a review of the Enterprise JavaBeans development and deployment phases, followed by an introduction to two types of JavaBeans—synchronous and asynchronous. Next is an in-depth examination of session and entity beans. In order for the reader to better understand Enterprise JavaBeans, a discussion ensues on EJB interfaces with a detailed description of an EJB’s life cycle.
The next section in Chapter 3 focuses on containers and their services. IBM’s WebSphere serves as the container model. The chapter explains the process whereby Enterprise JavaBeans live within a container and receive the full range of services that containers provide.
The chapter presents Enterprise JavaBeans from a client’s perspective and explores technologies necessary for accessing services supported by the EJB container.
Chapter 4, “RMI-IIOP, the JNDI, and Deployment Descriptors,” begins with an examination of Remote Method Invocation (RMI) calls on objects distributed throughout a web farm or an enterprise network. Originally, RMI technology was used to execute remote object access by importing the java.rmi package. RMI offers distributed garbage collection and object activation. However, J2EE uses RMI-IIOP and the Java Naming and Directory Interface (JNDI) for access to remote objects.
The next topic of interest covered is the role played by deployment descriptors in deploying J2EE applications. Entity bean authors indicate within the deployment descriptor how the container should manage the Enterprise JavaBean. They specify whether a bean is a session bean, the type of session bean (stateful or stateless), or one of the two types of entity beans. The author should indicate whether the bean is container-managed persistent or bean-managed persistent. The deployment descriptor should further indicate whether the bean is message driven. If so, the deployment descriptor should indicate that the message-driven bean has no interface. The final section of Chapter 4 describes how to deploy JAR files to a container for distribution.
Chapter 5, “.NET Language Integration Components,” provides detailed information about the Common Language Runtime (CLR). Similar to a J2EE web container, the CLR serves as the .NET Framework manager and provides services ranging from verifying the validity of data types before compiling, to ensuring that the application conforms to both the Common Type Specification (CTS) and Common Language Specification (CLS), to managing security. The chapter also contains a discussion and examination of program executable (PE) files and introduces the concept of an assembly that contains all program binaries and file references required to execute the application.
Chapter 6, “ASP.NET Architecture,” examines ASP.NET’s infrastructure and begins by listing ASP.NET’s benefits and new features. The features include a code-behind model to separate HTML from program logic, an event-driven program model that allows developers to write events and create handlers for them, and server controls that manage client state by using view state.
The chapter examines ASP.NET namespaces with a description of System.Web.UI classes. A description of an ASP.NET page’s life cycle is accompanied by examples demonstrating how an ASP.NET page interacts with the CLR and the Framework to provide a user-friendly experience in developing ASP.NET applications.
A section in Chapter 6 examines web forms and explains how to add server-side controls to the form both declaratively and programmatically. A subsequent chapter section provides detailed instructions on how to create user-defined controls and add them to a web form. The chapter concludes with a discussion on security and error handling.
Chapter 7, “ASP.NET and Web Services,” provides a detailed overview of web services as they relate to ASP.NET. The chapter begins by posing the question: “What is a web service?” and proceeds with an examination of a service-oriented architecture. It explores XML and how it is integrated with web services.
A section is devoted to exploring how a client accesses web services by employing Simple Object Access Protocol (SOAP) and HTTP. It further explains how a Web Services Description Language (WSDL) file is generated and provides a detailed description of Universal Description, Discovery, and Integration (UDDI) and its use in discovering a web service.
Chapter 7 also provides information on object-oriented programming and describes best practices in programming to interfaces, a methodology that supports component reuse. Another chapter section discusses .NET’s architecture and explains how the framework consists of a series of components and interfaces. This examination further underscores how the ASP.NET infrastructure and .NET CLR collaborate to provide flexibility and support the development of scalable web services.
Chapter 8, “Interoperability Solutions from Third-Party Vendors,” introduces JNBridgePro. This software package enables developers to achieve true cross- platform interoperability. JNBridgePro generates proxies that allow developers to access .NET functions and methods from J2EE as though they were written in J2EE and vice versa. A user-friendly interface permits developers to select the classes and interfaces they desire and then generate proxies to facilitate application and method interoperability.
Chapter 9, “Best Practices, Design Patterns, Security, and Business Solutions,” concludes the text with a review of both J2EE and .NET technologies and how they achieve interoperability internally and externally. The chapter provides a section on best practices, on how to apply them, and when it is appropriate to use them in context. A section is devoted to selecting a business model, such as the MVC model, and knowing how to use it effectively in application design.
Applying security measures and managing application state in a distributed environment are also discussed and accompanied with examples demonstrating how to achieve these tasks. The chapter concludes with an example written in Visual Basic .NET to demonstrate multilanguage interoperability in the IFCE case study.
Appendix A provides a brief overview of J2EE’s Java Connector Architecture (JCA). Connectors facilitate access to Java-based Enterprise Information Systems (EISs) and legacy data stores. The appendix tells developers where they can obtain more information about connectors and download the JCA specification.
And to conclude, Appendix B provides a list of recommended reading, as well as the main sources for various specifications relevant to the book.