• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tracking Client IDs using Thread names

 
Andrew Griffin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would appreciate any opinions on the following:
I am thinking of using Thread names as client IDs, for tracking database locks. The thread name can be set once on the client side, in a variety of ways. Can anyone think of a reason why this is inherently dangerous or possibly just stupid?
thanks in advance
 
Aleksey Matiychenko
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not stupid.
The only problem is with RMI side. I am using custom socket factory that in turn gets the name of the thread that is connecting to the server.
When I start my program I set the name of the thread to the client name supplied via a Dialog Box.
Otherwize the name of the thread is going to be generic and can be repeated accross different machines

 
agriffin
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aleksey -
Thank you for your response; that makes complete sense, and it will give me something to work on . . .
Andrew
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic