Solaris 8 Software Developer Supplement

Enterprise Interoperability

Java IDL and RMI-IIOP

J2SE 1.3.0 includes two significant enhancements to support for CORBA technologies: a production CORBA IDL compiler written in the Java language and the RMI over IIOP (RMI-IIOP) API. CORBA Interface Definition Language (IDL) is a language that defines only the interfaces for distributed systems. By using a neutral language to define interfaces, CORBA can support multiple languages. For the first time, the Java 2 SDK, Standard Edition includes an IDL compiler to compile language-neutral CORBA IDL into standard Java language bindings. These language bindings work with the Java IDL Object Request Broker (ORB) to support traditional CORBA programming in the Java programming language.

Since version 1.1 of the Java platform, the Remote Method Interface (RMI) has allowed programmers to write interfaces for distributed computing directly in the Java language. Because RMI used its own wire protocol, programmers had to give up the ability to communicate with objects written in other languages when they used RMI. RMI-IIOP uses the Java IDL ORB to enable the standard CORBA wire protocol, Internet InterORB Protocol (IIOP), to be used with RMI. Since IIOP is used for all communication, objects written in other languages such as C++ can communicate with RMI over IIOP distributed objects. Further, RMI has been accepted as the CORBA standard for mapping interfaces in the Java programming language to CORBA IDL. To facilitate programming in other languages, CORBA standard IDL can be generated from RMI-enabled classes. Existing RMI programs can be converted to use the IIOP protocol, typically with very limited changes.

RMI-IIOP combines the programming ease of RMI with JavaIDL's CORBA-compliant interaction with software written in other languages. By adhering to a few restrictions, RMI programmers can now use CORBA's IIOP communications to protocol to communicate with clients of any type, whether written entirely in the Java programming language or made up of components written in other CORBA-compliant languages.

Java Naming and Directory Interface (JNDI) API

J2SE 1.3.0's new Java Naming and Directory InterfaceTM (JNDI) API enables developers to add naming and directory functionality to applications written in the Java programming language. JNDI is designed to be independent of any specific naming or directory service implementation to enable seamless connectivity to heterogeneous enterprise naming and directory services. Thus a variety of services — new, emerging, and already deployed ones—can be accessed in a common way. Developers can use J2SE 1.3.0 to build powerful and portable directory-enabled applications by using this industry-standard interface.

The JNDI architecture consists of an API and a Service Provider Interface (SPI). Java applications use this API to access a variety of naming and directory services. The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application to access their services. JNDI in the J2SE 1.3.0 release comes with service providers for accessing the following services: