Chapter 15 Creating CORBA C++ Clients


Using CORBA ORB implementations other than EAServer

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

Connecting to EAServer 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 EAServer 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 EAServer 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).

EAServer IDL modules

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

EAServer IDL files

File name Description
SessionManager.idl Defines interfaces for session-based creation of EAServer component instances.
BCD.idl Defines the CORBA datatypes for EAServer's binary and fixed-point numeric datatypes.
MJD.idl Defines the CORBA datatypes for EAServer's date and time datatypes.
TabularResults.idl Defines the CORBA datatypes that represent result sets returned by a method invocation.

Performing datatype conversion

EAServer provides C++ header files to convert from the EAServer 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 EAServer 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

EAServer's naming service cannot be used with other client ORBs, so you must use the EAServer 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 EAServer client ORB

You can use the EAServer 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 © 2002 Sybase, Inc. All rights reserved.