[omniORB] changing CORBA interface

Duncan Grisby duncan at grisby.org
Mon Dec 17 12:49:13 GMT 2007


On Sunday 16 December, "Michael Kilburn" wrote:

> What kind of changes are allowed to idl interface? In my situation I have to
> change server's interface:
> - adding new entry to some methods' throw-specification
> - adding new constant
> - adding new method
> 
> existing clients use different ORBs, server uses omniORB. Is it ok to do
> these changes? Do I need to add new method to the end of interface?

According to the CORBA spec, no changes are permitted at all.

However, the way GIOP works means you can add new operations to existing
interfaces, and as long as a client doesn't call the new operation on an
old server, everything will be fine. If a client does call the new
operation on a server that doesn't understand it, you should get a
CORBA::BAD_OPERATION system exception. omniORB correctly does. I can't
tell you about other ORBs.

Adding a constant won't do any harm at all, since constants are just
compiled in to executables. Each one will have either seen it or not.
Changing the value of a constant is dangerous for obvious reasons.

Adding a new exception to an operation's throw clause won't do any harm
unless the exception is thrown to a client that doesn't expect it. If a
client does get an exception is wasn't expecting, it should throw
CORBA::UNKNOWN. Again, omniORB does that, but other ORBs may be less
robust.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list