Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

J2SE 1.4 breathes new life into the CORBA community, Part 1

Get started developing enterprise CORBA applications with the latest version of J2SE

  • Print
  • Feedback

Page 3 of 6

Note: Depending on the CORBA implementation you use, the ORB may be a single executable, multiple executables, or some combination of executables and shared libraries (such as DLLs on Windows). CORBA does not specify how an ORB is implemented. That makes sense: First, how a vendor implements the ORB depends highly on the capabilities of the device (hardware and operating system) upon which the ORB will run. Second, the implementation also depends on other value-adding services, such as load balancing and fault tolerance, that the vendor provides as competitive differentiators. Since the OMG cannot possibly know and control both these aspects, it has refrained from defining an ORB's physical implementation details.

What's new in J2SE 1.4?

As I mentioned earlier, the relationship between Java and CORBA started in 1998 with JDK 1.2, when Sun introduced Java IDL, a Java API for interoperability and integration with CORBA. Java IDL included both a Java-based ORB, which supported IIOP, and the IDL-to-Java compiler, idltojava, for generating client-side stubs and server-side code skeletons. In 1999, Sun released JDK 1.3, newly rechristened as J2SE, and introduced a new, 100% Pure Java IDL-to-Java compiler, idlj, along with support for IDL abstract interfaces and value types. Today, with J2SE 1.4, Sun completely supports the Portable Object Adapter (POA), portable interceptors, Interoperable Naming Service (INS), GIOP 1.2, and dynamic anys. I'll briefly touch upon all of these components in subsequent sections of this article.

J2SE 1.4 also includes a new naming service implementation called Object Request Broker Daemon (ORBD), which lets clients transparently locate and invoke persistent objects on servers in the CORBA environment. ORBD is a daemon process containing a bootstrap service, a transient naming service, a persistent naming service, and a server manager. J2SE 1.4 also supports (for backwards compatibility) tnameserv, which is a transient naming service implementation that originated in JDK 1.2. I recommend using ORBD in all your new applications. We'll be using it in our Hello World example later in this article. I'll talk more about transient and persistent object references in Parts 2 and 3 of this series.

In addition, J2SE 1.4 includes a new tool called servertool, which provides a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server with ORBD. I'll use this tool in Parts 2 and 3 of this series.

Portable Object Adapter

An object adapter in CORBA glues the server applications (objects) and the ORB together. An object adapter creates object references, managing objects' life cycles, dispatching client requests from the ORB to the correct object, and returning request results to the ORB. Until version 2.2, the CORBA specification only described a simple and vague object adapter, appropriately called the Basic Object Adapter (BOA). Since the BOA as described by the specification proved inadequate for creating enterprise applications, each ORB vendor added its own proprietary extensions, sometimes even using the same names as other vendors to create an illusion of interoperability and code portability. CORBA 2.2 introduced the POA, which addressed many of the BOA's deficiencies. True to its name, the POA guarantees code portability across ORBs. The POA has also introduced new terms to CORBA, such as servants and servant managers. Parts 2 and 3 of this series will cover the POA in detail with examples.

  • Print
  • Feedback

Resources