V
VisionSet
I send an object over RMI
// can't modify myObject here, I don't want server to see modifications.
myRemoteMethod(myObject);
// too late to modify myObject here, I don't want to wait for transmission
delay
But I want to do something to myObject after it has been safely serialised
(ie I don't want the server to know of the change I want to make). I don't
want to have to wait until the remote method returns. If I fire the method
off in its own thread then I can ascertain when that thread is running, but
I can't be sure when myObject has been serialised.
I realise I can get round this by cloning myObject but is there an
alternative. Seems a pain to have to implement cloning throughout my object
tree just for this, especially when serialisation is going to do it for me -
just that I can't get at it - or can I?
I think I can use Serialisation itself as a lower performance alternative to
cloning.
I'll probably do that if there is no alternative.
TIA
// can't modify myObject here, I don't want server to see modifications.
myRemoteMethod(myObject);
// too late to modify myObject here, I don't want to wait for transmission
delay
But I want to do something to myObject after it has been safely serialised
(ie I don't want the server to know of the change I want to make). I don't
want to have to wait until the remote method returns. If I fire the method
off in its own thread then I can ascertain when that thread is running, but
I can't be sure when myObject has been serialised.
I realise I can get round this by cloning myObject but is there an
alternative. Seems a pain to have to implement cloning throughout my object
tree just for this, especially when serialisation is going to do it for me -
just that I can't get at it - or can I?
I think I can use Serialisation itself as a lower performance alternative to
cloning.
I'll probably do that if there is no alternative.
TIA