Java Programming with CORBA: Advanced Techniques for Building Distributed Applications - Softcover

Brose, Gerald; Vogel, Andreas; Duddy, Keith

 
9780471376811: Java Programming with CORBA: Advanced Techniques for Building Distributed Applications

Inhaltsangabe

The leading guide for Java developers who build business applications with CORBA
Acknowledged experts present advanced techniques and real-world examples for building both simple and complex programs using Java with CORBA. The authors begin with a quick overview of CORBA, Java, object request brokers (ORBs), and EJB components, then quickly move on to show how to use them to build complete Java applications. This new volume features in-depth code examples, as well as expanded coverage of cutting-edge topics, including Portable Object Adaptor (POA), Remote Method Invocation (RMI) over IIOP, and EJB.

Die Inhaltsangabe kann sich auf eine andere Ausgabe dieses Titels beziehen.

Über die Autorin bzw. den Autor

GERALD BROSE is a research scientist at Freie Universitdt, Berlin, Germany. Widely published in the area of distributed objects and CORBA security, he is the principal author and maintainer of the open source CORBA implementation, JacORB. ANDREAS VOGEL was Chief Scientist at Borland/Inprise and is now founding CTO of mspect. KEITH DUDDY is a senior research scientist at the Distributed Systems Technology Center (DSTC) in Brisbane, Australia, where he leads a team investigating customizable generation of CORBA and workflow support for enterprise systems. He currently sits on the OMG Architecture Board.

Auszug. © Genehmigter Nachdruck. Alle Rechte vorbehalten.

CHAPTER 1 Benefits of Java Programming with CORBA

This book brings together two of the major object models used in distributed computing: the Common Object Request Broker Architecture (CORBA) and Java. Each represents a different approach to distributed computing. On one hand, CORBA defines an abstract, inherently distributed object model and provides an infrastructure that enables invocations of operations on these objects as if they were local to the application using them. The implementations of objects can be located anywhere on a network and implemented in any programming language and on any operating system for which implementations of the CORBA infrastructure exist. The heterogeneity between the caller of the operation and its implementation is hidden by the CORBA infrastructure.

Java, on the other hand, is a regular, non-distributed, object-oriented programming language. Its main contribution to distributed computing is the introduction of platform-independent, low-level code that can be dynamically loaded and linked. When it is integrated with World Wide Web protocols and browsers, it results in what are known as applets. In this approach, instead of invoking a method on a remote object, the code for the class providing the method is transferred across the network and run locally, and then the method is invoked on a local object instance. Java has been extended with its own version of remote invocations also to support invocation-based distributed computing. This extension is known as Java Remote Method Invocation (RMI).

In 1999, Java was split into three different editions: the Java 2 standard Edition (J2SE), the Java 2 Micro Edition (J2ME), and the Java 2 Enterprise Edition (J2EE). A subset of the CORBA standard, the basic IDL-based communications mechanism, is part of J2SE. Furthermore, the J2EE standard includes Enterprise JavaBeans (EJB). EJB is a component model for distributed Java programming. The EJB specification mandates RMI as the interface for communication between objects. The initial specification did not define a specific transfer protocol. For the 2.0 version of EJB, CORBA's Internet Inter-ORB Protocol (IIOP) has been selected as the protocol for ensuring interoperability. That makes EJB a component model on top of a Java/CORBA foundation.

Java and CORBA converge when a mapping is defined from CORBA's interface definition language, OMG IDL, to Java. When combined with a run-time system that supports this language mapping, the result is a Java Object Request Broker (Java ORB). For the remainder of this chapter we discuss this combination of the two paradigms. We explain the advantages of Java for CORBA users and the advantages of CORBA for Java users in sections 1.1 and 1.2. In section 1.3, we also explain the relationship between Java ORBs ands RMI.

1 .1 What Does Java offer CORBA Programmers?

The main reasons for using a Java language mapping OMG IDL can be broadly categorised into features unique to the Java programming language and features of Java as a development platform:

* Object-Oriented Language
* Portability across platforms
* Web Integration
* Component model

1.1.1 Object-Oriented Programming Language

Java ORBs provide the same functionality as any other ORB. The main language bindings offered by current ORB products are C++, C, COBOL, ADA and Smalltalk. In our experience, Java provides a cleaner approach programming than C++, with fewer memory management responsibilities, no pointers, a less confusing syntax, and simpler method resolution rules. Moreover, its language syntax and its object model blend well with IDL. In other words, the IDL language mapping defined by the OMG is conceptually straightforward, so Java programmers are faced with only a moderate set of extensions when compared to other languages.

Additionally, Java provides features not available in C or C-++, such as automatic garbage collection and integrated thread support. These features are generally desirable and particularly useful for distributed systems programming, as we shall see throughout this book.

1.1.2 Portability of Applications across Platforms

Java programs are highly portable due to the standardized byte-code representation generated by Java compilers. Wide industry support means that compilers and run-time systems for virtually any hardware platform and operating system are available, from smart cards to supercomputers. For improved support for this diversity of environments, Sun Microsystems provides three different editions of the Java 2 platform. The Micro Edition targets consumer devices such as pagers, PDAS, or even smart cards. The Standard Edition covers the traditional programming language features and JavaBeans, the Java component model. The Enterprise Edition provides a server-side component model and framework that together make up a Java Application Server.

The wide availability of the Java platform is a significant advantage over other programming languages because a single source code or compiled byte-code set will be usable on any platform without porting. This makes Java the ideal platform for component programming, as the deployment platform is not determined by hardware or operating systems; the Java platform is the deployment platform. Consequently, development and maintenance costs can be significantly reduced.

Java's portability also means that if your Java ORB is implemented entirely in Java, then it is automatically available on any system for which a Java platform exists. Many Java ORBs are indeed implemented entirely in Java. Another big plus of the Java platform is that it already contains a limited CORBA implementation: Java IDL is part of both the Standard and the Enterprise Edition of the Java 2 platform.

1.1.3 Web Integration

Java is often referred to as the programming language for the internet. What does this mean? Basically, it means Java integrates well with both web browsers and web servers and thus provides excellent support for the development of web based applications. For CORBA applications that need to be integrated with web infrastructure, Java is the natural choice.

The Java applet model allows execution of Java code embedded in a html page, directly from a web browser. Due to the varying support for Java in web browsers and the bandwidth limitation of modem connections, applets have had only limited success in Internet applications.

„Über diesen Titel“ kann sich auf eine andere Ausgabe dieses Titels beziehen.