[omniORB] What's wrong with me?

Duncan Grisby dgrisby@uk.research.att.com
Tue, 22 May 2001 11:28:29 +0100


On Monday 21 May, edward_lin wrote:

> I happened to find a strange behavior of corba object implementation, it
> seemed that the attributes set by first corba client will be overwritten by
> the second corba client invocation; the following is the simplifed code

[...]
> I ran first client to set attributes to "1" and "2", the process waited for
> the keystroke, at this time, I ran second client to set attributes to "5"
> and "6", and console printed "11". That's OK, then I fed a keystroke to the
> first client, and it printed unexpected "11", why not "3"? 

I think you have fundamentally misunderstood the CORBA object model.
Both of your clients are talking to the _same_ object. Of course they
see the same values as each other. You have to create two separate
objects if you want the actions of the two clients to be separate.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --