Chapter 17 Creating CORBA C++ Clients


Using CORBA ORB implementations other than Jaguar

Jaguar's IIOP implementation allows you to use any CORBA client ORB to invoke Jaguar components. You can also use the Jaguar client ORB to execute components that are hosted by another vendor's server ORB.

Connecting to Jaguar with a third-party client ORB

In some cases, you may wish to use another vendor's ORB in your client applications. For example, you may have an existing installation of the ORB on client workstations.

Clients that use another ORB can use the same code as the Jaguar ORB, except for the following differences:

Generating compatible stubs

CORBA Interface Definition Language (IDL) files are required in order to use another vendor's ORB implementation class. Jaguar Manager generates IDL files for components when you create or import them using Jaguar Manager. Use the IDL-to-C++ compiler that comes with your ORB software to generate compatible stubs.

For information about which component IDL files and Jaguar IDL files you need to use to generate stubs for other ORBs, see "Generating compatible stubs" (although this section refers to Java clients, it also applies to C++ clients).

Jaguar IDL modules

Use the ORB vendor's IDL-to-C++ compiler to generate stubs for the files in the table, "Jaguar IDL files". All IDL files are installed in the Jaguar include subdirectory. "Writing CORBA C++ clients" describes how these interfaces are used to instantiate Jaguar components and call component methods. For additional information, see the comments in each IDL file.

Jaguar IDL files

File name

Description

SessionManager.idl

Defines interfaces for session-based creation of Jaguar component instances.

BCD.idl

Defines the CORBA datatypes for Jaguar's binary and fixed-point numeric datatypes.

MJD.idl

Defines the CORBA datatypes for Jaguar's date and time datatypes.

TabularResults.idl

Defines the CORBA datatypes that represent result sets returned by a method invocation.

Performing datatype conversion

Jaguar provides C++ header files to convert from the Jaguar CORBA datatypes to those commonly used in C++. "Supported datatypes" lists the datatypes displayed in Jaguar Manager, the equivalent CORBA IDL types, and the C++ datatypes used in stub methods. If you are using another vendor's ORB, use the Jaguar header files in your application. For languages other than C++, see the comments in the IDL files for details on how the data is interpreted.

Instantiating components using a third-party ORB

Jaguar's naming service cannot be used with other client ORBs, so you must use the Jaguar SessionManager::Manager interface to instantiate components from another ORB, as described in "Instantiating stub instances".

Also, you must use standard format IORs, not the URL format, as described in "Creating a Manager instance".

Connecting to third-party ORBs using the Jaguar client ORB

You can use the Jaguar client-side ORB to execute components hosted by another vendor's server-side ORB, as long as the server-side ORB accepts IIOP connections and the required interfaces are defined in standard CORBA IDL. Implement your client as follows:

  1. Import all the required IDL modules into Jaguar Manager, as described in "Importing existing IDL modules".
  2. Generate stubs for each imported module using Jaguar Manager, as described in "Generating stubs". You must generate stubs for each module individually.

 


Copyright © 2000 Sybase, Inc. All rights reserved.