next up previous contents
Next: The omniORB2 API Up: No Title Previous: The Basics

IDL to C++ Language Mapping

Now that you are familiar with the basics, it is important to familiar yourselves with the IDL to C++ language. The mapping is described in detail in [OMG99a]. If you have not done so, you should obtain a copy of the document and use that as the programming guide to omniORB2.

The specification is not an easy read. The alternative is to use one of the books on CORBA programming that has begun to appear. For instance, the ``Advanced CORBA Programming with C++'' by Michi Henning and Steve Vinoski includes many example code bits to illustrate how to use the CORBA 2.3 C++ mapping.

Incompatibilities with pre-2.8.0 releases

Before 2.8.0, omniORB2 implements the CORBA 2.0 C++ mapping. Since 2.8.0, the mapping has been updated to CORBA 2.3. Unfortunately, to comply with the CORBA 2.3 specification, it is necessary to change the semantics of a few APIs in a way that is incompatible with older omniORB2 releases. The incompatible changes are limited to:

  1. the extraction of string, object reference and typecode from an Any.
  2. the DII interface now defaults to report a system exception by raising a C++ exception instead of returning the exception as an environment value.

The changes are minor and requires minimal changes to the application source code. However, it is not possible to detect the old usage at compile time. In particular, unmodified code that use the affected Any extraction operators would most certainly cause runtime errors to occur.

To smooth the transition from the old usage to the new, an ORB configuration variable omniORB::omniORB_27_CompatibleAnyExtraction can be set to revert the any extraction operators to the old semantics. More information can be found in chapter 9.



Sai Lai Lo
Wed Sep 22 19:28:07 BST 1999