Archived
This forum has been archived. Please start a new discussion on GitHub.
Life cycle operations coment
xdm
La Coruña, Spain
in Help Center
Hi zeroc
First of all i found the Life cylce operations article very interesting, and well explained. Congratulations michi.
one question i'm not understand is the example that you make with NuclearBomb and Process
//Client A do this
ProcessPrx p=createProcess("Fred");
//Client B
// supose Fred is allready destroyed
NuclearBombPrx b=createNuclearBomb("Fred");
//Client A
p->launch();
What's happen here? the call sucess to a inteterface of diferent type or raise an exception beacuse the Type is not the expected
First of all i found the Life cylce operations article very interesting, and well explained. Congratulations michi.
one question i'm not understand is the example that you make with NuclearBomb and Process
//Client A do this
ProcessPrx p=createProcess("Fred");
//Client B
// supose Fred is allready destroyed
NuclearBombPrx b=createNuclearBomb("Fred");
//Client A
p->launch();
What's happen here? the call sucess to a inteterface of diferent type or raise an exception beacuse the Type is not the expected
0
Comments
-
xdm wrote:Hi zeroc
one question i'm not understand is the example that you make with NuclearBomb and Process
//Client A do this
ProcessPrx p=createProcess("Fred");
//Client B
// supose Fred is allready destroyed
NuclearBombPrx b=createNuclearBomb("Fred");
//Client A
p->launch();
What's happen here? the call sucess to a inteterface of diferent type or raise an exception beacuse the Type is not the expected
The type of the target object is unknown on the client side. (For example, the interface could be of a type that is more derived than the type of the proxy used by the client to invoke the operation.) So, the Ice protocol does not transmit the type of the target object at all.
The server only gets the object identity to decide which object should receive the request. In turn, this means that, if I have a proxy to an object, and that object is destroyed and another object is recreated with the same identity, invocations on the proxy will go to the wrong object.
As a rule, this means that such an invocation will fail, because it is unlikely that the target object will have an operation with the same name, and with input paramters that happen to decode correctly.0