Hello,
I just stumbled about a strange behaviour: after the creation of the DataModule, the ClientID of the Channel and Message are different. Normally this is not a problem, because if you initially call a method in sync the Message.ClientID will be set to the value of the Channel.ClientID
However, if the first call is asynchronous, the MessageID still keeps it’s original value (my guess it, that the cloned channel gets the assigned ClientID of the Message and in sync mode it is the opposite way as both objects are already existing).
On the Client:
==============
Source:
OutputDebugString(PWideChar('1-Message.ClientID:'+GuidToString(Message.ClientID)));
OutputDebugString(PWideChar('1-Channel.ClientID:'+GuidToString(Channel.ClientID)));
self.LoginService_AsyncEx.BeginTestAction(DoAsyncCallback,nil);
Sleep(2000);
OutputDebugString(PWideChar('2-Message.ClientID:'+GuidToString(Message.ClientID)));
OutputDebugString(PWideChar('2-Channel.ClientID:'+GuidToString(Channel.ClientID)));
self.LoginService.TestAction;
OutputDebugString(PWideChar('3-Message.ClientID:'+GuidToString(Message.ClientID)));
OutputDebugString(PWideChar('3-Channel.ClientID:'+GuidToString(Channel.ClientID)));
Results in:
1-Message.ClientID:{61683156-615B-41D1-8A7B-4C973A1DAE7D}
1-Channel.ClientID:{56816B00-2BF0-470D-BA75-AA24F236D346}
2-Message.ClientID:{61683156-615B-41D1-8A7B-4C973A1DAE7D}
2-Channel.ClientID:{56816B00-2BF0-470D-BA75-AA24F236D346}
3-Message.ClientID:{56816B00-2BF0-470D-BA75-AA24F236D346}
3-Channel.ClientID:{56816B00-2BF0-470D-BA75-AA24F236D346}
On the Server:
==============
TLoginService.TestAction$self.ClientID:{61683156-615B-41D1-8A7B-4C973A1DAE7D} //this is the initial value of Message
TLoginService.TestAction$self.ClientID:{56816B00-2BF0-470D-BA75-AA24F236D346} //this is the initial value of Channel