New Posts New Posts RSS Feed: Can we determine the client that started a save?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Can we determine the client that started a save?

 Post Reply Post Reply
Author
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Topic: Can we determine the client that started a save?
    Posted: 14-Aug-2009 at 7:09am
The Principal of the user doing the save is available to the OnSaving and OnSaved event handlers (you can also always obtain it from the thread for the duration of the request on the server).  The Principal is also always available on the client, either from EntityManager.Principal or the thread.  It might be the best way of uniquely identifying each client, or maybe useful in a mapping of Principals to UserTokens.  
Back to Top
Sinnema View Drop Down
Groupie
Groupie
Avatar

Joined: 23-Mar-2009
Location: Muri AG, EU, CH
Posts: 54
Post Options Post Options   Quote Sinnema Quote  Post ReplyReply Direct Link To This Post Posted: 14-Aug-2009 at 12:10am
Hi,
 
We need to find a unique Identifier for the Client from which the SaveChanges originated. In the OnSaving and OnSaved methods on the Server we do see a SessionKey, but that is not the UserToken we use in the PushNotification. How can we determine from which Client the Save originated?
 
We would like to send this Identifier allong to all Clients. That way the Client from which the SaveChanges originated, knows it does not have to do anything when it receives the Push Notification from the server with it's own Id in the message. All other Clients will refetch the changed Entities (and handle concurrency) on receiving the Push Notification.
 
Regards,
Paul Sinnema
Diartis AG
 


Edited by Sinnema - 14-Aug-2009 at 12:16am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down