Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Tracking Client IDs using Thread names

 
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
 
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

 
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
 
We don't have time to be charming! Quick, read this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic