title: Java thread associated variable
body: <p>I would like to associate a variable / value with a thread so that I don't have to explicitly pass it down the call stack. It's basically a global variable that is scoped to the current thread.</p>
  
  <p>I have a method that needs to define a variable that will be accessible in the callstack x more methods deep. I don't want to have to pass it all X method layers deep.</p>
  
  <p>Everywhere I search folks give examples using the ThreadLocal class. Maybe I'm missing something, but using ThreadLocal, how do I get a reference to the ThreadLocal variable when I'm X levels deep in a method calls?</p>
  
  <p>All help is appreciated.</p>