IntelliJ Java IDE
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Tracking Client IDs using Thread names Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Tracking Client IDs using Thread names" Watch "Tracking Client IDs using Thread names" New topic
Author

Tracking Client IDs using Thread names

Andrew Griffin
Greenhorn

Joined: May 15, 2001
Posts: 12
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

Joined: Apr 03, 2001
Posts: 178
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

Joined: May 13, 2001
Posts: 6
Aleksey -
Thank you for your response; that makes complete sense, and it will give me something to work on . . .
Andrew
 
 
subject: Tracking Client IDs using Thread names
 
Threads others viewed
Assignment Deliverables - Client persists or Not ?
Session tracking in WAP
Session Tracking in Wap
Help to check SCJD result
RMI Multi-Threading/Security
MyEclipse, The Clear Choice