Question

I'd like to add a method to my existing server's CORBA interface. Will that require recompiling all clients?

I'm using TAO.

Was it helpful?

Solution

Recompilation of clients is not required (and should not be, regardless of the ORB that you use). As Adam indicated, lookups are done by operation name (a straight text comparison).

I've done what you're describing with our ACE/TAO-based system, and encountered no issues (servers were in ACE/TAO C++, clients were ACE/TAO C++, C# using Borland's Janeva, and OmniORBPy).

OTHER TIPS

Assuming that the clients and servers are communicating via IIOP, no recompilation is required. An IIOP message contains the name of the interface, the name of the method, and the parameters. If none of those things have changed, then everything should remain compatible. Adding another method to the interface won't change any of those existing things.

On the other hand, if your objects are using a different protocol, or if the clients are in-process with the server and thus bypassing IIOP, you may need to make sure everything gets recompiled.

Operations (methods) are looked-up by name, so you only need to recompile the clients that use the new operation.

Clients using colocation (i.e. running within the same process with colocation enabled in ORB) must be recompiled. Remote clients may remain the same - as said previously, methods are matched by symbolic name.

It depends on usage of new idl method. If Corba invocation is static(SII), meaning your client is linked with stub, you have to recompile a stub if you want to use your new added method interface.

If corba invocation is dynamic(DII), there is no stub required for client. None of recompilation is required. In this case, your client code should be like:

     remoteObjRef->invoke("methodname", args); // send("methodname", args)

I did CORBA DII invocation four years ago and it works with TAO client&TAO/Jacorb/IONA corba service.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top