Skip to main content

Extending IDL Interfaces to add new operations and consider versions.

  • May 17, 2013
  • 0 replies
  • 0 views

Summary The recommended approach to adding operations to existing IDL interfaces.
Article Number 26802
Environment All CORBA ORBs (Orbix 3.x, Orbix 6.x, Orbacus 4.x) All Platforms
Question/Problem Description What is the recommended approach to adding operations to existing IDL interfaces?
Clarifying Information Consider an existing IDL interface, used by multiple clients. We would like to add a new operation to this interface, without having to update existing clients, which may continue to use the original operations.
Error Message
Defect/Enhancement Number
Cause
Resolution
The recommended approach to extending CORBA IDL interfaces is to use interface inheritance and version numbers. 
 
For example, consider the following test interface: 
 
interface Test_1_0
{
void operation1();
};
 
 We would like to add a new operation to the above. To do this, we define a new interface containing the new operation and inheriting from the old interface. This interface will have a new version number: 
 
interface Test_1_1 : Test_1_0
{
void operation2();
};
 
 The interface "Test_1_1" will now consist of both "operation1" and "operation2". 
 
 Using the above method, inheritance avoids duplication of definitions, while the version numbers provide a means of tracking what the server supports.
Workaround
Notes
Attachment
Created date: 25 November 2011
Last Modified: 13 February 2013
Last Published: 12 May 2012
First Published date: 25 November 2011

#Orbix
#KnowledgeDocs