[omniORB] Is a servant allowed as member variable of another servant?

Steinar Bang sb at dod.no
Fri Jan 23 10:31:16 GMT 2004


Platform: Intel PIII, RedHat 8,
	  g++ 3.2
	  omniORB 3.0.5

(Replacing the actual interface names with A and B for simplicity)

The code in the servant for interface B, uses a reference to interface
A to get some data.

Currently the servant for interface A and B, run in separate
processes, and the servant for interface B finds a reference to an
implementation of A, by using the CORBA naming service.

I tried to avoid the IIOP overhead by putting both servants into the
same process (the code of the servants resides in shared libraries).

I created an instance of the servant for A as a member variable of B,
and used the _this() function to get a reference.  This didn't work.

The program holding the implementation for B didn't crash, but it
didn't show up in the CORBA naming service.  In effect it wasn't
present in the system.

Is a servant for one interface, allowed to exist as a member variable
of a servant for another interface?

Or is there something fundamentally wrong with what I tried to do? 

Ie. should I try to find out what's wrong, or is this something that
never will work...? ;-)

Thanx!


- Steinar




More information about the omniORB-list mailing list