[Fwd: Re: [Fwd: store references explicit]]



 Hi Elliot and everybody else!
 
 > On Tue, 10 Oct 2000, Christian Schaefer wrote:
 >
 > > I want to map a CORBA-Object to a C struct, by using a hashtable.
This
 > > hashtable should contain respectively two tuple: (CORBA-Object,
 > > struct) and (struct, CORBA-Object).
 >
 > This sounds like you are doing something broken.
 >
 > An object implementation would use the data inside its servant. A
client
 > uses operations to access the data. You shouldn't need to use a hash
table
 > at all.
 >
 > This may sound crazy, but could you explain the bigger picture so
perhaps
 > we can provide some alternative solutions?
 We are constructing a CORBA interface for an existing piece
 of software with a pure functional interface.  For each object of this
 program
 accessed remotely we create a CORBA object.  We map the CORBA object to
 the
 one in the program using a hash table.
 
 If the program allocates a new object on a request by the client, the
 CORBA interface (on server side) also allocates the corresponding CORBA
 object.  This tuple
 of objects is entered into the hash table twice, to allow access to the
 objects in both directions.  The server than returns the CORBA object
to
 the
 client.  This works so far.
 
 Later the client calls the server and passes as argument a CORBA
 object.  The
 server has to lookup the correponding reference to the object in the
 existing
 software by accessing the hash table with the CORBA object (reference)
 passed
 in the call.
 This returns the proper CORBA object as long as there are only CORBA
 objects
 of one type hashed into the table. If we hash objects of different
 types, we
 still find a object in the hash table, but it is the wrong one.
 
 So we assume we confused something with the references to CORBA
objects.
 Are these only identified together with the corresponding servant?  How
 do we access the proper references then?
 Or is there a predestined way to realise such a scenario?
 
 Thanks for your help!
 
 Chris
 --
 kriz gmx net




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