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

Re: ExternalDatabase.objectForName()



Falko Braeutigam wrote:

> On Wed, 06 Sep 2000, Martin Harper wrote:
> > The ability to get hold of an object based on it's unique string name,
> > using objectForName(), is really handy, but is there any way to get hold
> > of an object based on it's unique ID ( as got from container().id() ),
> > short of making a hashtable solely designed to map unique IDs to
> > OzoneProxys?
> No! The object ID is _not_ meant to be used by client applications. It makes no
> sense to use the OID. On all places where you would like to use the ID of an
> object you can use the proxy itself. In fact, the only data field of proxies
> _is_ the OID of the database object they refer to.
>
> Falko

Well, my problem is that I'm doing some Ozone stuff on one computer, and at the end
of that I send an event to a process on a seperate computer. Within that event I
need to include some reference to a couple of these objects. The second process can
then access the database to do lots of funky things with these objects.

Now, OzoneProxys are externalizeable, which is good, but sadly I'm working to a
spec which insists that the reference to the object that is sent over the network
must be a long (on a DataOutputStream). So I can't just shunt the entire thing down
the cable.

Ok - if I shouldn't be sending the value of the object ID down the cable, what
should I be sending?
Martin