[omniORB] Inheritance problems

Andrey Koubychev email@vtc.ru
Tue, 24 Apr 2001 11:28:51 +0200


Hello dear developers,

I have a small problem with interface inheritance. I know how to
inherit interfaces, but think this case is somewhat special and
requires advice of guru :)

I've developed some set of CORBA modules, which should communicate
with each other with some logic. Then must produce LIB file for win32 and linux
and include all base functionality of modules into that libraries. So,
future developer can easily extend functionality by inheriting from my
"BaseModule" and writing something on top of it.
Until some time it was all ok. I had libs for every case needed, all
compiled and worked like it should. But once, there was a need to add
interface to BaseModule, so , some modules can do narrowing from
BaseModule to AdvancedModule. But this does not work at me. For
example I use corbaloc(host:port/BaseModule) to get object and then
narrow it to AdvancedModule. Narrowing was is not successful in this
case. Then I've printed out object_to_string at server and gave it to
string_to_object at client side. Narrowing was successful, but any calls to it gives me
"Attempt to call object with null ....". I don't know really CORBA good,
but I dare to suggest that all request comes to POA_BaseModule and it
does not know anything about upper POA_AdvancedModule.
Here is how its defined in my .h files

in basemodule.h

class BaseModule: public POA_BaseModule,
public PortableServer::RefCountServantBase{
....

in intermediate.h
class Intermediate:public BaseModule{


....
in advancedmodule.h
class AdvancedModule:public IntermediateModule, public POA_AdvancedModule,

in Advanced.idl
interface  AdvancedInterface : BaseInterface,AdditionalInterface{


Earlier , I have already did modules with inheritance and all worked.
But files compiled together not separately like in case of libs.

I use omniORB 3.04, g++ 2.95.3 , vc++ 6

-- 
Best regards,
Kubyshev Andrey                          mailto:email@vtc.ru