[Contents] [Previous] [Next]
This chapter presents Netscape Internet Service Broker for Java (ISB for Java), an implementation of the CORBA 2.0 specification for developing distributed object-based applications. It includes the following major sections:
What is CORBA?
The Common Object Request Broker Architecture (CORBA) specification was developed by the Object Management Group to address the complexity and high cost of developing software applications. CORBA defines an object-oriented approach to creating software components that can be reused and shared between applications. Each object encapsulates the details of its inner workings and presents a well-defined interface, which reduces application complexity. The cost of developing applications is also reduced because once an object is implemented and tested, it can be used over and over again.
ISB for Java's Object Request Broker (ORB) connects a client (either an application running in a Java virtual machine or an applet running in a Java-enabled browser) with the objects (called services or servers) it wishes to use. The client does not need to know whether the service resides on the same computer or on a remote computer somewhere on the network. The client only needs to know the service's name and understand how to use the service's interface. The ORB locates the object, routes the request, and returns the result. You can develop objects that act both as clients (using services from other objects) and servers (providing services to other objects).
Figure 1.1 Client application acting on an object through an ORB.
Note:
The ORB is not a separate process. It is a collection of libraries and other
resources that clients and services use to communicate.
What is ISB for Java?
ISB for Java is an ORB that provides a complete implementation of the CORBA specification. ISB for Java makes it easy for you to develop distributed, object-based clients and services. ISB for Java offers these important features:
Overview of the Development Process
The first step to creating an application with ISB for Java is to specify all of your service's interfaces using the OMG's Interface Definition Language (IDL). The IDL mappings for the Java language are covered in the Netscape Internet Service Broker for Java Reference Guide. The interface specification you create is used by the idl2java
compiler to generate stub routines for the client application or applet and skeleton code for the service implementation. The stub routines are used by the client for all method invocations. You use the skeleton code, along with code you write, to implement the service. The completed code for the client and service is used as input to your Java compiler to produce a Java application or applet and an object service.
Figure 1.2 Creating an application and a service using ISB for Java.
Interoperability with ISB for C++
Java clients created with ISB for Java can communicate with services developed with ISB for C++, a separate product. Use the same IDL code you used to develop your Java application as input to the ISB IDL compiler supplied with ISB for C++. Then use the resulting C++ skeletons to develop the service implementation. Also, services written using ISB for Java will work with clients written using ISB for C++. In fact, a service written using ISB for Java will work with any CORBA-compliant client; a client written using ISB for Java will work with any CORBA-compliant service.
Figure 1.3 Creating a client with ISB for Java and a service with ISB for C++.
ISB for Java Features
In addition to providing the features defined in the CORBA specification, ISB for Java offers enhancements that increase application performance and reliability.
Feature
|
Description
|
---|
Dynamic Invocation Interface |
A client can obtain a service's interface and dynamically construct requests to invoke the methods it provides. See The Dynamic Invocation Interface for more details.
|
Interface Repository |
The interface repository (IR) maintains information about ORB objects, such as modules, interfaces, operations, attributes, and exceptions. An IDL interface is provided that enables clients to query the IR to obtain language binding information or to discover newly added interfaces. The ORB also accesses the IR when it needs to check the types of values in a client request or verify an interface inheritance graph. For more information, see The Interface Repository.
|
Web Naming |
Web Naming allows you to associate Uniform Resource Locators with objects, allowing an object reference to be obtained by specifying a URL. For more information, see Naming and Binding to Objects.
|
Caffeine: Defining Interfaces Without IDL |
ISB for Java's java2iiop utility (one in a set of tools collectively called Caffeine) allows you to use Java instead of IDL to define interfaces. You can use the java2iiop utility to adapt existing Java code to use distributed objects, or if you do not have the time to learn IDL. The java2iiop utility generates the necessary container classes, client stubs, and server skeletons from Java code. For more information, see Defining CORBA Interfaces With Java.
|
Enhanced Thread and Connection Management |
ISB supports a thread-per-session policy for managing connections between client applications and servers. For more information, see Managing Threads and Connections.
|
Dynamic Skeleton Interface |
The Dynamic Skeleton Interface (DSI) provides a mechanism for creating an object implementation that does not inherit from a generated skeleton interface. Normally, an object implementation is derived from a skeleton class generated by the idl2java compiler. DSI allows an object to register itself with the ORB, receive operation requests from a client, process the requests, and return the results to the client without inheriting from a skeleton class. For more information, see The Dynamic Skeleton Interface.
|
IDL to Java Mapping |
ISB for Java conforms with the OMG Java Language Mapping RFP. See "IDL to Java Mapping" in the Netscape Internet Service Broker for Java Reference Guide for a summary of ISB's current IDL-to-Java language mapping as implemented by the idl2java compiler. For each IDL construct, a section describes the corresponding Java construct.
|
[Contents] [Previous] [Next]
Last Updated: 02/04/98 13:44:30
Copyright © 1997
Netscape Communications Corporation