ThreadLocal Initialization in Java?
<p>I'm building a singleton that has a ThreadLocal as an instance variable, this singleton has a method that may be accessed by multiple threads and it is lazily instantiated. Right now I'm thinking on something like this:</p>

<pre><code>static final ThreadLocal&lt;HashMap&gt; bindingContext = new ThreadLocal&lt;HashMap&gt;();
</code></pre>

<p>But I'm not sure if it is a good idea, I also have the option to make it an instance variable since I'm using it (as I said on a singleton).</p>

<p>So the question is, where is the best place to initialize that class variable or should it be a class variable at all?</p>
