• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S RMI => Lock identifies clients with thread's name

 
Alex Belisle Turcot
Ranch Hand
Posts: 516
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

up to now, I've been uniquely identifying the threads with their ID. The lock would be held for a specific thread id.

I would/will document that "lock - update - unlock" must be performed within a single transaction/call.

I'm thinking of another way to allow locking over multiple RMI requests. I could pass the customerId with every request and set the thread's name to it, and then use that as the unique Id for lock.

Of course, if 2 users are using the same customer ID, they would interfere with each other, but I think it is still OK for the requirements: "reserve the record for a client".

What do you think, is there drawback to this ?

* Cookie is not an option in my assignment *

Regards
Alex
[ November 24, 2007: Message edited by: Alex Belisle Turcot ]
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think there are many ways to do the same thing, but there is always a better way. Personally i would go for the first choice you mentioned, as it is cleaner and because it provides a higher layer (that's business layer).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic