Changing a CORBA interface without recompiling

扶醉桌前 提交于 2019-12-23 12:53:11

问题


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

I'm using TAO.


回答1:


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).




回答2:


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.




回答3:


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




回答4:


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.




回答5:


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.



来源:https://stackoverflow.com/questions/36890/changing-a-corba-interface-without-recompiling

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!