Change CORBA interface without recompiling

I would like to add a method to the existing CORBA server interface. Will this require recompiling all clients?

I am using TAO.

+4
source share
5 answers

A recompilation of clients is not required (and should not be, regardless of the ORB you use). As Adam pointed out, the search is performed by the name of the operation (direct text comparison).

I did what you described with our ACE / TAO system and did not find any problems (the servers were in ACE / TAO C ++, the clients were ACE / TAO C ++, C # using Borland Janeva and OmniORBPy).

+4
source

Assuming that clients and servers communicate via IIOP, recompilation is not required. The IIOP message contains the interface name, method name, and parameters. If none of these things have changed, everything should remain compatible. Adding another method to the interface will not change any of the existing things.

On the other hand, if your objects use a different protocol or the clients are in process with the server and, thus, bypassing IIOP, you may need to recompile everything.

+3
source

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

+1
source

Clients using colocation (that is, working in the same process with colocation enabled, included in the ORB) must be recompiled. Remote clients can remain unchanged - as indicated earlier, methods are mapped by a symbolic name.

+1
source

It depends on the use of the new idl method. If the Corba call is static (SII), that is, your client is associated with a stub, you need to recompile the stub if you want to use the new interface of the added method.

If the corba call is dynamic (DII), there is no stub for the client. No recompilation is required. In this case, your client code should look like this:

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

I made a CORBA DII call four years ago and it works with the TAO client and the TAO / Jacorb / IONA corba service.

0
source

Source: https://habr.com/ru/post/1276500/


All Articles