• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

lock / unlock research

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
I am trying my client to call lock (Object ID, int record) but every time I call the remote class lock method the memeory of object ID changes from actual to something else ie for example if the actual Object is ClientID1234&45 then if I check this object on remote side then it becomes something like this way ClientID4343&34. This is very frustrating. Can you give me some hint why this is happening ?.
Thank you,
 
BJ Grau
Ranch Hand
Posts: 234
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is being passed by copy, so a whole new object is being created server-side.
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
What you need is a way to identify a client on the serverside over different requests, so you can lock/unlock records on the server side for the right client.
There are several ways to do this, some depend on the communication protocol you use ...
think about it !

regards,
G´┐Żnther.
http://www.javacoding.net
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gurpreet,
It's because you are using a stub on the client which will not have the same ID as the real object on the server, if you are using "this" as an ID.
Michael Morris
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic