• Post Reply Bookmark Topic Watch Topic
  • New Topic

keeping track of client ids  RSS feed

 
Johann Carl Friedrich Gauss
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suppose i decide to use object serialization instead of RMI
on the server, i spawn a thread for each connected client that services that client. the name of each thread is a positive integer, i.e. "1", "2", "3"...
now, when a client calls lock(int) or unlock(int), the methods check the name of the current thread executing them...that tells which client is locking or unlocking...
is this a decent idea, or am i thinking about it all wrong?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!