[omniORB] proxy

Sai-Lai Lo S.Lo@orl.co.uk
Tue, 19 May 1998 18:45:48 +0100


>>>>> Andrew Hanusch writes:

>     I need to force omniOrb to create a proxy object for an object in my
>     current address space. Currently omniOrb simply returns the pointer
>     to the actual implementation object that was created in another
>     thread. I want to use the proxy object for inter-thread marshalling
>     and synchronization. Is it possible to force omniOrb to always return
>     a proxy or maybe at least when I tell it to even if everything is in
>     one address space?

You are right about how omniORB deals with co-located clients. This is a
limitation that I want to get rid of asap.

There is no API to force omniORB to create a proxy object in this
situation. 

However, if you give the ORB an IOR that points to a local object and if
the local object does not exist at that time, the ORB would create a proxy
object for it. When you invoke on it, the invocation would loopback from
the network interface into the same address space and serviced by a
server thread. If the local object still does not exist, you will see a
OBJECT_NOT_EXIST. However, if you have created the local object after the
proxy object was created, your invocation would be routed to correctly.

It may be better to look into other ways of doing what you want rather than
relying on this particular behaviour of the ORB.

Sai-Lai