Problems with reference_to_servant?



I'm trying to use PortableServer_POA_reference_to_servant. It works in some
places in my code, when I use it like this:
    ref = impl_RMP_Interface__create(poa, id, ev);
    serv = PortableServer_POA_reference_to_servant(poa, interfaceref, ev);

to modify a newly created object, however when I try to manipulate an object
created elsewhere in the server code:
    name = RMP_Interface__get_name(interface, ev);
    serv = PortableServer_POA_reference_to_servant(poa, interface, ev);

The first call (name =) works, so I'm pretty sure my objref is intact, but
the reference_to_servant call doesn't work, and gives this error:

** (process:15382): WARNING **: file poa.c: line 1885: assertion
`reference->adaptor_obj != NULL' failed. returning exception
'IDL:omg.org/PortableServer/POA/WrongAdapter:1.0'

The POA being passed into the call is the same on both calls, and is the POA
of the RMP_Interface factory in both cases. I don't entirely understand the
error above enough to track this down.

Any ideas?

Cheers,
Chris.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]